trace: fix build with gcc9
authorJan Beulich <jbeulich@suse.com>
Thu, 6 Jun 2019 12:06:29 +0000 (14:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 6 Jun 2019 12:06:29 +0000 (14:06 +0200)
commit45342cd88d564a7da2dfbbc921898805008b0b6c
treecbd37d57f70b2d2c84976b844222165a11071809
parent8266ed668c8e0ac62a321cd7b1716770790ee34f
trace: fix build with gcc9

While I've not observed this myself, gcc 9 (imo validly) reportedly may
complain

trace.c: In function '__trace_hypercall':
trace.c:826:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  826 |     uint32_t *a = d.args;

and the fix is rather simple - remove the __packed attribute. Introduce
a BUILD_BUG_ON() as replacement, for the unlikely case that Xen might
get ported to an architecture where array alignment higher that that of
its elements.

Reported-by: Martin Liška <martin.liska@suse.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
master commit: 3fd3b266d4198c06e8e421ca515d9ba09ccd5155
master date: 2019-05-13 09:51:23 +0200
xen/common/trace.c