• Frediano Ziglio's avatar
    qxl_dev: Align QXLRam to 4 bytes · beda5ec7
    Frediano Ziglio authored
    This avoids compilers detect misaligned access which can lead to
    warnings.
    In QEMU the structure is allocated at the beginning of a 4Kb page,
    in Xspice is allocated with a calloc, so the structure will end up 4
    bytes aligned as well with these users. We are not aware of other users
    of QXLRam, but if there was, it's likely the struct would be at least
    naturally aligned, so this change should not impact anyone.
    Aligning to 4 bytes maintains the size of the structure unchanged
    avoiding possible ABI changes.
    clang currently generates an invalid function call if a misaligned
    4 byte atomic operation is detected.
    
    This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1565766Signed-off-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
    Acked-by: Christophe Fergeau's avatarChristophe Fergeau <cfergeau@redhat.com>
    beda5ec7
Name
Last commit
Last update
m4 Loading commit data...
spice Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
git.mk Loading commit data...
meson.build Loading commit data...
spice-protocol.pc.in Loading commit data...