summaryrefslogtreecommitdiff
path: root/lib/librte_cmdline
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2017-09-07 14:09:23 +0100
committerThomas Monjalon <thomas@monjalon.net>2017-10-05 18:36:07 +0200
commit0a10db80bca3262977646f814e913f4af0b627cc (patch)
tree49c7083c36bc4ead16c6fc53cadf315f87de1581 /lib/librte_cmdline
parentc28576fa9c58a9f59326760d28fd1ed66fab3463 (diff)
downloaddpdk-next-eventdev-0a10db80bca3262977646f814e913f4af0b627cc.zip
dpdk-next-eventdev-0a10db80bca3262977646f814e913f4af0b627cc.tar.gz
dpdk-next-eventdev-0a10db80bca3262977646f814e913f4af0b627cc.tar.xz
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> Acked-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Diffstat (limited to 'lib/librte_cmdline')
-rw-r--r--lib/librte_cmdline/cmdline.c3
1 files changed, 2 insertions, 1 deletions
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
}