From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH] cmdline: fix warning for unused return value
Date: Fri, 15 Sep 2017 10:45:51 +0000 [thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA640C79F2C@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <20170907130923.157924-1-bruce.richardson@intel.com>
> 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 <bruce.richardson@intel.com>
> Subject: [dpdk-dev] [PATCH] cmdline: fix warning for unused return value
>
> 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 <bruce.richardson@intel.com>
> ---
A pragmatic fix for the compile warning at hand;
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
> 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
prev parent reply other threads:[~2017-09-15 10:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-07 13:09 Bruce Richardson
2017-09-07 13:49 ` Olivier MATZ
2017-10-05 16:36 ` Thomas Monjalon
2017-09-07 17:50 ` Stephen Hemminger
2017-09-07 19:46 ` Olivier MATZ
2017-09-08 9:01 ` Bruce Richardson
2017-09-15 10:45 ` Van Haaren, Harry [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E923DB57A917B54B9182A2E928D00FA640C79F2C@IRSMSX102.ger.corp.intel.com \
--to=harry.van.haaren@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).