]> git.proxmox.com Git - mirror_qemu.git/commit
hw/virtio: Fix brace Werror with clang 6.0.0
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 12 May 2018 04:59:40 +0000 (21:59 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 23 May 2018 14:02:02 +0000 (17:02 +0300)
commitebf2a499a5c43d5eaee2b70ab5ae655af49d935c
tree7d4f488a0fad0de4063da1df0d6f71ab7cb96962
parente3638151da2a314dda3ed862cf707b8b66aca4cb
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 <mst@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost-user.c