From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E1A9A1041 for ; Thu, 7 Sep 2017 15:44:31 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Sep 2017 06:44:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,358,1500966000"; d="scan'208";a="148640899" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by fmsmga005.fm.intel.com with ESMTP; 07 Sep 2017 06:44:29 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Thu, 7 Sep 2017 14:09:23 +0100 Message-Id: <20170907130923.157924-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.13.5 Subject: [dpdk-dev] [PATCH] cmdline: fix warning for unused return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 13:44:32 -0000 When DPDK is compiled on Ubuntu with extra warnings turned on, there is a warning about the return value from write() being unchecked. Rather than having builds disable the warning, which may mask other cases we do care about, we can add a dummy use of the return value in the code to silence it in this instance. Signed-off-by: Bruce Richardson --- lib/librte_cmdline/cmdline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c index a9c47be..d749165 100644 --- a/lib/librte_cmdline/cmdline.c +++ b/lib/librte_cmdline/cmdline.c @@ -205,7 +205,8 @@ cmdline_printf(const struct cmdline *cl, const char *fmt, ...) } if (ret >= BUFSIZ) ret = BUFSIZ - 1; - write(cl->s_out, buf, ret); + ret = write(cl->s_out, buf, ret); + (void)ret; free(buf); #endif } -- 2.7.4