From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id BDBB92FDD for ; Fri, 15 Sep 2017 12:45:54 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 15 Sep 2017 03:45:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,396,1500966000"; d="scan'208";a="149537041" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga005.jf.intel.com with ESMTP; 15 Sep 2017 03:45:52 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.59]) by IRSMSX153.ger.corp.intel.com ([169.254.9.34]) with mapi id 14.03.0319.002; Fri, 15 Sep 2017 11:45:52 +0100 From: "Van Haaren, Harry" To: "Richardson, Bruce" , "dev@dpdk.org" CC: "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH] cmdline: fix warning for unused return value Thread-Index: AQHTJ9+DiXzi4MhYz0eLKbpCpG7vO6K1z5Kw Date: Fri, 15 Sep 2017 10:45:51 +0000 Message-ID: References: <20170907130923.157924-1-bruce.richardson@intel.com> In-Reply-To: <20170907130923.157924-1-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTk0YTFmNDItYWQ1YS00NjlhLWJhZTUtNGU0YzNmNDc5YmRhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InNMcTNCemdlWWJYOHphSWNNMkpIUXJobFJ1Mmd3eFNWXC84dGo1THU1OTFZPSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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: Fri, 15 Sep 2017 10:45:55 -0000 > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Thursday, September 7, 2017 2:09 PM > To: dev@dpdk.org > Cc: Richardson, Bruce > Subject: [dpdk-dev] [PATCH] cmdline: fix warning for unused return value >=20 > 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. >=20 > Signed-off-by: Bruce Richardson > --- A pragmatic fix for the compile warning at hand; Acked-by: Harry van Haaren > lib/librte_cmdline/cmdline.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > 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 >=3D BUFSIZ) > ret =3D BUFSIZ - 1; > - write(cl->s_out, buf, ret); > + ret =3D write(cl->s_out, buf, ret); > + (void)ret; > free(buf); > #endif > } > -- > 2.7.4