Peter Maydell 1229e46d3c block/vhdx: 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. Avoid the bug by not using the
"modify in place" byte swapping functions.

There are a few places where the in-place swap function is
used on something other than a packed struct field; we convert
those anyway, for consistency.

Patch produced with scripts/coccinelle/inplace-byteswaps.cocci.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-11-05 15:09:54 +01:00
..
2018-07-10 16:01:52 +02:00
2018-08-31 16:28:33 +02:00
2018-08-15 12:50:39 +02:00
2016-10-07 14:14:06 +02:00
2018-09-25 15:50:15 +02:00
2018-07-05 10:29:19 +02:00
2018-08-15 12:50:39 +02:00
2018-10-12 09:46:14 +08:00
2018-02-09 05:05:11 +01:00
2018-07-10 17:28:29 +01:00
2017-07-17 11:34:11 +08:00
2018-08-15 12:50:39 +02:00
2018-07-10 16:01:52 +02:00
2018-07-02 14:45:23 +02:00
2018-11-05 15:09:54 +01:00
2018-06-15 14:49:44 +02:00