Skip to content

Commit

Permalink
vhost: fix build with GCC 4.8
Browse files Browse the repository at this point in the history
Adds braces around initializer to resolve the following
false-positive build error with gcc 4.8.5 on CentOS:
lib/vhost/vduse.c:441:9: error: missing braces around initializer
  [-Werror=missing-braces]

Fixes: 653327e ("vhost: add multiqueue support to VDUSE")

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
  • Loading branch information
alialnu authored and mcoquelin committed Jul 6, 2023
1 parent 4789eb4 commit 25bdd1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vhost/vduse.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ vduse_device_create(const char *path)
pthread_t fdset_tid;
uint32_t i, max_queue_pairs, total_queues;
struct virtio_net *dev;
struct virtio_net_config vnet_config = { 0 };
struct virtio_net_config vnet_config = {{ 0 }};
uint64_t ver = VHOST_VDUSE_API_VERSION;
uint64_t features;
struct vduse_dev_config *dev_config = NULL;
Expand Down

0 comments on commit 25bdd1c

Please sign in to comment.