summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2019-05-13 10:32:38 +0100
committerFrediano Ziglio <fziglio@redhat.com>2019-07-18 16:38:04 +0100
commitf436204eadc89e911b523c26c09b2ab13def1f53 (patch)
treec0a51db0a9de8fe4530a90d7b155481f0c0cd1c3
parent5874495db3e947f768d6f9d8615bb1b7f2c6c201 (diff)
qxl_dev: Fix alignment for QXLReleaseInfo
Do not declare the structure as aligned. The start/end-packed.h headers affects structures without specification only using MingW or Microsoft compilers. For other platform SPICE_ATTR_PACKED macro should be used. This way the definition are the same for all compiler. This structure is used in a lot of QXL structures which are not aligned causing to have an aligned structure to be potentially unaligned. Some compilers may report a warning. As this structure has no holes this change does not make any size change using any compiler. The change will only change the alignment from 4/8 to 1. This could affect structures containing this union however beside packed structure in qxl_dev.h (which are not affected) there are no other usages affecting ABI by spice-gtk, Qemu or spice-server. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Snir Sheriber <ssheribe@redhat.com>
-rw-r--r--spice/qxl_dev.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index a9cc4f4..659f930 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -275,7 +275,7 @@ typedef struct SPICE_ATTR_ALIGNED(4) SPICE_ATTR_PACKED QXLRam {
} QXLRam;
-typedef union QXLReleaseInfo {
+typedef union SPICE_ATTR_PACKED QXLReleaseInfo {
uint64_t id; // in
uint64_t next; // out
} QXLReleaseInfo;