diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-12-10 11:26:48 +0000 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-02-01 13:46:44 +0100 |
commit | ac928b8ee875f1ac256702a2b93c8eb828ddaff2 (patch) | |
tree | a52470eeb2b3263b6bc8fed05f6e0b28dbcabb97 /util/atomic64.c | |
parent | 0dbaaa7981e92a6b629b1cf0056dcafadd6ee8a5 (diff) |
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 'util/atomic64.c')
0 files changed, 0 insertions, 0 deletions