summary refs log tree commit diff stats
path: root/scripts/qapi/types.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-12-10 11:26:48 +0000
committerKevin Wolf <kwolf@redhat.com>2019-02-01 13:46:44 +0100
commitac928b8ee875f1ac256702a2b93c8eb828ddaff2 (patch)
treea52470eeb2b3263b6bc8fed05f6e0b28dbcabb97 /scripts/qapi/types.py
parent0dbaaa7981e92a6b629b1cf0056dcafadd6ee8a5 (diff)
downloadfocaccia-qemu-ac928b8ee875f1ac256702a2b93c8eb828ddaff2.tar.gz
focaccia-qemu-ac928b8ee875f1ac256702a2b93c8eb828ddaff2.zip
block/vdi: Don't take address of fields in packed structs
Taking the address of a field in a packed struct is a bad idea, because
it might not be actually aligned enough for that pointer type (and
thus cause a crash on dereference on some host architectures). Newer
versions of clang warn about this.

Instead of passing UUID related functions the address of a possibly
unaligned QemuUUID struct, use local variables and then copy to/from
the struct field as appropriate.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts/qapi/types.py')
0 files changed, 0 insertions, 0 deletions