a58cabd0e3
S390IPLState contains two IplParameterBlock, which may in turn have either a IPLBlockPV or a IplBlockFcp, both ending with a variable sized field (an array). This causes a warning with clang 11 or greater, which checks that variable sized type are only allocated at the end of the struct: In file included from ../qemu-cfi-v3/target/s390x/diag.c:21: ../qemu-cfi-v3/hw/s390x/ipl.h:161:23: error: field 'iplb' with variable sized type 'IplParameterBlock' (aka 'union IplParameterBlock') not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] IplParameterBlock iplb; ^ ../qemu-cfi-v3/hw/s390x/ipl.h:162:23: error: field 'iplb_pv' with variable sized type 'IplParameterBlock' (aka 'union IplParameterBlock') not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] IplParameterBlock iplb_pv; In this case, however, the warning is a false positive, because IPLBlockPV and IplBlockFcp are allocated in a union wrapped at 4K, making the union non-variable sized. Fix the warning by turning the two variable sized arrays into arrays of size 0. This avoids the compiler error and should produce the same code. Signed-off-by: Daniele Buono <dbuono@linux.vnet.ibm.com> Message-Id: <20201105221905.1350-5-dbuono@linux.vnet.ibm.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> |
||
---|---|---|
.. | ||
3270-ccw.c | ||
ap-bridge.c | ||
ap-device.c | ||
ccw-device.c | ||
ccw-device.h | ||
css-bridge.c | ||
css.c | ||
event-facility.c | ||
ipl.c | ||
ipl.h | ||
Kconfig | ||
meson.build | ||
pv.c | ||
s390-ccw.c | ||
s390-pci-bus.c | ||
s390-pci-inst.c | ||
s390-pci-vfio.c | ||
s390-skeys-kvm.c | ||
s390-skeys.c | ||
s390-stattrib-kvm.c | ||
s390-stattrib.c | ||
s390-virtio-ccw.c | ||
s390-virtio-hcall.c | ||
s390-virtio-hcall.h | ||
sclp.c | ||
sclpcpu.c | ||
sclpquiesce.c | ||
tod-kvm.c | ||
tod-qemu.c | ||
tod.c | ||
trace-events | ||
trace.h | ||
vhost-user-fs-ccw.c | ||
vhost-vsock-ccw.c | ||
virtio-ccw-9p.c | ||
virtio-ccw-balloon.c | ||
virtio-ccw-blk.c | ||
virtio-ccw-crypto.c | ||
virtio-ccw-gpu.c | ||
virtio-ccw-input.c | ||
virtio-ccw-net.c | ||
virtio-ccw-rng.c | ||
virtio-ccw-scsi.c | ||
virtio-ccw-serial.c | ||
virtio-ccw.c | ||
virtio-ccw.h |