summaryrefslogtreecommitdiff
path: root/slirp/ip.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-01-22 18:18:21 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-02-07 15:49:08 +0200
commitc74e3ae9c83750705abaa583b28741d349364561 (patch)
tree2c344866635145a63a12c4891b84f9ed16c15388 /slirp/ip.h
parent59fa06ac74c1736dd1270fadde6a0077877bea04 (diff)
slirp: Avoid marking naturally packed structs as QEMU_PACKED
Various ipv6 structs in the slirp headers are marked QEMU_PACKED, but they are actually naturally aligned and will have no padding in them. Instead of marking them with the 'packed' attribute, assert at compile time that they are the size we expect. This allows us to take the address of fields within the structs without risking undefined behaviour, and suppresses clang -Waddress-of-packed-member warnings. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/ip.h')
0 files changed, 0 insertions, 0 deletions