qemu-e2k/docs
Philippe Mathieu-Daudé 880a7817c1 misc: Replace zero-length arrays with flexible array member (manual)
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 7be41675f7).

All these instances of code were found with the help of the
following command (then manual analysis, without modifying
structures only having a single flexible array member, such
QEDTable in block/qed.h):

  git grep -F '[0];'

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76497732932f
[3] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=17642a2fbd2c1

Inspired-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-03-16 22:07:42 +01:00
..
config docs: Grammar and spelling fixes 2018-07-13 10:16:04 +01:00
devel docs: Be consistent about capitalization of 'Arm' 2020-03-12 11:20:20 +00:00
interop misc: Replace zero-length arrays with flexible array member (manual) 2020-03-16 22:07:42 +01:00
specs docs: Be consistent about capitalization of 'Arm' 2020-03-12 11:20:20 +00:00
sphinx docs/sphinx/hxtool.py: Remove STEXI/ETEXI support 2020-03-12 11:14:06 +00:00
spin docs: create config/, devel/ and spin/ subdirectories 2017-06-07 18:22:03 +02:00
system docs: add Orange Pi PC document 2020-03-12 16:27:33 +00:00
tools docs: Move tools documentation to tools manual 2020-02-25 10:48:06 +00:00
user docs: Be consistent about capitalization of 'Arm' 2020-03-12 11:20:20 +00:00
COLO-FT.txt colo: Update Documentation for continuous replication 2020-03-03 18:04:47 +08:00
amd-memory-encryption.txt doc: fix typos for documents in tree 2019-03-06 10:40:21 +01:00
barrier.txt ui: add an embedded Barrier client 2019-09-17 13:43:22 +02:00
block-replication.txt colo: Update Documentation for continuous replication 2020-03-03 18:04:47 +08:00
bootindex.txt docs qemu-doc: Avoid ide-drive, it's deprecated 2017-06-04 18:42:55 +03:00
can.txt docs: Be consistent about capitalization of 'Arm' 2020-03-12 11:20:20 +00:00
ccid.txt libcacard: improve documentation 2014-06-10 07:44:01 +02:00
colo-proxy.txt doc: fix typos for documents in tree 2019-03-06 10:40:21 +01:00
conf.py docs: Create defs.rst.inc as a place to define substitutions 2020-03-06 10:04:58 +00:00
cpu-hotplug.rst docs/cpu-hotplug.rst: Fix rST markup issues 2019-03-07 14:26:44 +00:00
defs.rst.inc docs/system: convert Texinfo documentation to rST 2020-03-06 10:05:12 +00:00
generic-loader.txt docs/generic-loader: mention U-Boot and Intel HEX executable formats 2018-08-20 11:24:31 +01:00
hyperv.txt i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment 2019-10-22 09:38:42 +02:00
igd-assign.txt vfio/pci: Add IGD documentation 2016-05-26 11:12:05 -06:00
image-fuzzer.txt docs: List all image elements currently supported by the fuzzer 2014-09-22 11:39:35 +01:00
index.html.in docs/index.rst, docs/index.html.in: Reorder manuals 2020-03-12 11:14:06 +00:00
index.rst docs/index.rst, docs/index.html.in: Reorder manuals 2020-03-12 11:14:06 +00:00
memory-hotplug.txt docs: Grammar and spelling fixes 2018-07-13 10:16:04 +01:00
microvm.rst docs/microvm.rst: add instructions for shutting down the guest 2019-11-19 10:01:34 +01:00
multi-thread-compression.txt Replace '-enable-kvm' with '-accel kvm' in docs and help texts 2018-06-28 19:05:32 +02:00
multiseat.txt tests/docker/test-mingw and docs: Remove --with-sdlabi=2.0 2019-02-04 15:25:21 +00:00
nvdimm.txt docs/nvdimm: add example on persistent backend setup 2019-09-16 06:27:35 -04:00
pci_expander_bridge.txt pxb: cleanup 2016-03-11 16:59:12 +02:00
pcie.txt docs: pcie: Spell out machine type needs for PCIe features 2018-03-01 16:25:37 +02:00
pcie_pci_bridge.txt pci: removed the is_express field since a uniform interface was inserted 2018-02-08 21:06:41 +02:00
pr-manager.rst scsi: add multipath support to qemu-pr-helper 2017-09-22 21:07:27 +02:00
pvrdma.txt hw/pvrdma: Remove max-sge command-line param 2019-01-19 10:31:24 +02:00
qcow2-cache.txt qcow2: Default to 4KB for the qcow2 cache entry size 2019-03-08 12:26:45 +01:00
qdev-device-use.txt qemu-options: Remove deprecated "-virtioconsole" option 2019-02-05 16:50:19 +01:00
qemu-option-trace.rst.inc docs/qemu-option-trace.rst.inc: Remove redundant comment 2020-03-12 11:14:06 +00:00
qemu_logo.pdf docs: add qemu logo to pdf 2017-01-16 10:11:43 +01:00
qemupciserial.inf docs: Grammar and spelling fixes 2018-07-13 10:16:04 +01:00
rdma.txt doc: fix typos for documents in tree 2019-03-06 10:40:21 +01:00
replay.txt docs: Be consistent about capitalization of 'Arm' 2020-03-12 11:20:20 +00:00
spice-port-fqdn.txt docs: add spice-port-fqdn.txt 2012-12-17 14:01:41 +01:00
throttle.txt docs: Fix description of the leaky bucket algorithm in throttle.txt 2016-09-13 18:12:34 +03:00
usb-storage.txt usb: Fix typo in documentation 2017-01-24 23:26:52 +03:00
usb2.txt docs/usb2.txt: ehci has six ports 2018-08-21 10:22:03 +02:00
virtio-balloon-stats.txt Remove the deprecated -balloon option 2018-08-31 09:52:13 +02:00
virtio-net-failover.rst docs: fix rst syntax errors in unbuilt docs 2019-12-19 16:20:21 +00:00
virtio-pmem.rst docs: fix rst syntax errors in unbuilt docs 2019-12-19 16:20:21 +00:00
xbzrle.txt docs/xbzrle: correction 2016-10-13 17:23:53 +02:00
xen-save-devices-state.txt Fix up dangling references to qmp-commands.* in comment and doc 2018-03-02 13:48:26 -06:00