diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-12-10 12:04:36 +0000 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2018-12-12 10:39:28 +0100 |
commit | c9aacaadeb42076c01b07e59dd94dcf73f751e05 (patch) | |
tree | 78fa2e7fae44aa97e80439770b89c23588bfe854 /disas | |
parent | 1883e8fc8005e9ef452890a075bae98e8c432968 (diff) |
hw/s390x/virtio-ccw.c: 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.
Patch produced with scripts/coccinelle/inplace-byteswaps.cocci
(with a couple of long lines manually wrapped).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20181210120436.30522-1-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'disas')
0 files changed, 0 insertions, 0 deletions