Searched hist:ac928b8e (Results 1 – 1 of 1) sorted by relevance
/qemu/block/ |
H A D | vdi.c | ac928b8e Mon Dec 10 11:26:48 GMT 2018 Peter Maydell <peter.maydell@linaro.org> 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>
|