Re: [PATCH v1] vhost: fix build

2022-08-25 Thread David Marchand
Hello, On Thu, Aug 25, 2022 at 2:37 PM zhoumin wrote: > > > > I had seen a similar warning during 22.07 when cross compiling but did > > not investigate much. > > The patch that I had written at the time was: > > > > diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c > > index 35fa4670f

Re: [PATCH v1] vhost: fix build

2022-08-25 Thread zhoumin
Hi David, Thanks for your kind reply. On Wed, Aug 24, 2022 at 22:09, David Marchand wrote: On Mon, Aug 22, 2022 at 9:42 AM Min Zhou wrote: This patch fixes the following build failure seen on CentOS 8 with gcc 12.1 because of uninitialized struct variable: [..] ../lib/vhost/virtio_net.c:

Re: [PATCH v1] vhost: fix build

2022-08-24 Thread David Marchand
On Mon, Aug 22, 2022 at 9:42 AM Min Zhou wrote: > > This patch fixes the following build failure seen on CentOS 8 > with gcc 12.1 because of uninitialized struct variable: > > [..] > ../lib/vhost/virtio_net.c:1159:18: warning: 'buf_vec[0].buf_addr' may be used > uninitialized [-Wmaybe-uninitial

Re: [PATCH v1] vhost: fix build

2022-08-23 Thread zhoumin
Ping. On Mon, Aug 22, 2022 at 15:42, Min Zhou wrote: This patch fixes the following build failure seen on CentOS 8 with gcc 12.1 because of uninitialized struct variable: [..] ../lib/vhost/virtio_net.c:1159:18: warning: 'buf_vec[0].buf_addr' may be used uninitialized [-Wmaybe-uninitialized

[PATCH v1] vhost: fix build

2022-08-22 Thread Min Zhou
This patch fixes the following build failure seen on CentOS 8 with gcc 12.1 because of uninitialized struct variable: [..] ../lib/vhost/virtio_net.c:1159:18: warning: 'buf_vec[0].buf_addr' may be used uninitialized [-Wmaybe-uninitialized] 1159 | buf_addr = buf_vec[vec_idx].buf_addr;