mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-21 06:58:36 -07:00
Description copied from Linux kernel commit from Gustavo A. R. Silva
(see [3]):
--v-- description start --v--
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to
declare variable-length types such as these ones is a flexible
array member [1], introduced in C99:
struct foo {
int stuff;
struct boo array[];
};
By making use of the mechanism above, we will get a compiler
warning in case the flexible array does not occur last in the
structure, which will help us prevent some kind of undefined
behavior bugs from being unadvertenly introduced [2] to the
Linux codebase from now on.
--^-- description end --^--
Do the similar housekeeping in the QEMU codebase (which uses
C99 since commit
|
||
|---|---|---|
| .. | ||
| vhost-backend.h | ||
| vhost-scsi-common.h | ||
| vhost-scsi.h | ||
| vhost-user-blk.h | ||
| vhost-user-fs.h | ||
| vhost-user-scsi.h | ||
| vhost-user.h | ||
| vhost-vsock.h | ||
| vhost.h | ||
| virtio-access.h | ||
| virtio-balloon.h | ||
| virtio-blk.h | ||
| virtio-bus.h | ||
| virtio-crypto.h | ||
| virtio-gpu-bswap.h | ||
| virtio-gpu-pci.h | ||
| virtio-gpu-pixman.h | ||
| virtio-gpu.h | ||
| virtio-input.h | ||
| virtio-iommu.h | ||
| virtio-mmio.h | ||
| virtio-net.h | ||
| virtio-pmem.h | ||
| virtio-rng.h | ||
| virtio-scsi.h | ||
| virtio-serial.h | ||
| virtio.h | ||