[dpdk-dev] [PATCH] vhost: fix build issue caused by unchecked returned values
Ferruh Yigit
ferruh.yigit at intel.com
Fri Mar 30 17:31:52 CEST 2018
On 3/30/2018 4:16 PM, Maxime Coquelin wrote:
> This patch fixes below build issue seen with some compilers
> or build options:
>
> lib/librte_vhost/fd_man.c: In function ‘fdset_pipe_read_cb’:
> lib/librte_vhost/fd_man.c:284:2: error: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Werror=unused-result]
> read(readfd, charbuf, sizeof(charbuf));
> ^
> lib/librte_vhost/fd_man.c: In function ‘fdset_pipe_notify’:
> lib/librte_vhost/fd_man.c:324:2: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
> write(fdset->u.writefd, "1", 1);
> ^
>
> Reported-by: Andrew Rybchenko <arybchenko at solarflare.com>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Squashed into relevant commit [1] in next-net, thanks.
(comment s/read()/write()/ fixed while applying)
[1]
7b23d25feb92 ("vhost: add pipe event for optimizing negotiating")
More information about the dev
mailing list