mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol
synced 2025-12-26 14:18:31 +00:00
According to C standard the size of a structure without fields is not defined (see https://stackoverflow.com/questions/21851930/size-of-empty-structure-in-c-and-c). As we almost only use GCC currently these structures are of size 0. This can became a problem if 2 sides talking a given protocol use these structures. To avoid such possible mismatch (for instance having one side C and the other C++ which defines these structures as having 1 as size) add an empty (0-size array) field. Although a 0-size array is not considered also that portable we use extensively this feature with different compilers never encountering issues. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Uri Lublin <uril@redhat.com> |
||
|---|---|---|
| .. | ||
| barrier.h | ||
| controller_prot.h | ||
| end-packed.h | ||
| enums.h | ||
| error_codes.h | ||
| foreign_menu_prot.h | ||
| ipc_ring.h | ||
| macros.h | ||
| Makefile.am | ||
| meson.build | ||
| protocol.h | ||
| qxl_dev.h | ||
| qxl_windows.h | ||
| start-packed.h | ||
| stats.h | ||
| stream-device.h | ||
| types.h | ||
| vd_agent.h | ||
| vdi_dev.h | ||