From: Richard Henderson Date: Sat, 12 May 2018 04:59:40 +0000 (-0700) Subject: hw/virtio: Fix brace Werror with clang 6.0.0 X-Git-Tag: qemu-xen-4.12.0-rc1~215^2~11 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ebf2a499a5c43d5eaee2b70ab5ae655af49d935c;p=qemu-xen.git hw/virtio: Fix brace Werror with clang 6.0.0 The warning is hw/virtio/vhost-user.c:1319:26: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] VhostUserMsg msg = { 0 }; ^ {} While the original code is correct, and technically exactly correct as per ISO C89, both GCC and Clang support plain empty set of braces as an extension. Cc: Michael S. Tsirkin Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 41cbd8a455..ca554d4ff1 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -1355,7 +1355,7 @@ static bool vhost_user_requires_shm_log(struct vhost_dev *dev) static int vhost_user_migration_done(struct vhost_dev *dev, char* mac_addr) { - VhostUserMsg msg = { 0 }; + VhostUserMsg msg = { }; assert(dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER);