|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [qemu-xen master] configure: Expand test which disable -Wmissing-braces
commit 625eb5e96dc96aa7fddef59a08edae215527f19c
Author: Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Fri Jan 6 15:21:10 2023 +0100
Commit: Anthony PERARD <anthony.perard@xxxxxxxxxx>
CommitDate: Tue Jan 17 15:10:57 2023 +0000
configure: Expand test which disable -Wmissing-braces
With "clang 6.0.0-1ubuntu2" on Ubuntu Bionic, the test with build
fine, but clang still suggest braces around the zero initializer in a
few places, where there is a subobject. Expand test to include a sub
struct which doesn't build on clang 6.0.0-1ubuntu2, and give:
config-temp/qemu-conf.c:7:8: error: suggest braces around
initialization of subobject [-Werror,-Wmissing-braces]
} x = {0};
^
{}
These are the error reported by clang on QEMU's code (v7.2.0):
hw/pci-bridge/cxl_downstream.c:101:51: error: suggest braces around
initialization of subobject [-Werror,-Wmissing-braces]
dvsec = (uint8_t *)&(CXLDVSECPortExtensions){ 0 };
hw/pci-bridge/cxl_root_port.c:62:51: error: suggest braces around
initialization of subobject [-Werror,-Wmissing-braces]
dvsec = (uint8_t *)&(CXLDVSECPortExtensions){ 0 };
tests/qtest/virtio-net-test.c:322:34: error: suggest braces around
initialization of subobject [-Werror,-Wmissing-braces]
QOSGraphTestOptions opts = { 0 };
Reported-by: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Message-Id: <20230106142110.672-1-anthony.perard@xxxxxxxxxx>
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index 26c7bc5154..08eac0d42c 100755
--- a/configure
+++ b/configure
@@ -1288,7 +1288,11 @@ fi
# Disable -Wmissing-braces on older compilers that warn even for
# the "universal" C zero initializer {0}.
cat > $TMPC << EOF
+struct s {
+ void *a;
+};
struct {
+ struct s s;
int a[2];
} x = {0};
EOF
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |