File xen.9df4c648d79f32946b65d5795c172a91d7d71cfe.patch of Package xen
From: Wei Liu <wei.liu2@citrix.com>
Date: Tue, 28 Aug 2018 14:56:38 +0100
Subject: 9df4c648d79f32946b65d5795c172a91d7d71cfe
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
rombios: remove packed attribute for pushad_regs_t
The structure already has explicitly padding.
Removing the attribute silences a clang 6 warning:
tcgbios.c:1519:34: error: taking address of packed member 'u' of class or structure 'pushad_regs_t' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]
®s->u.r32.edx);
^~~~~~~~~~~~~~~
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
tools/firmware/rombios/32bit/rombios_compat.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/tools/firmware/rombios/32bit/rombios_compat.h
+++ b/tools/firmware/rombios/32bit/rombios_compat.h
@@ -43,25 +43,25 @@ typedef struct {
struct {
Bit32u filler[4];
Bit8u bl, bh;
Bit16u filler1;
Bit8u dl, dh;
Bit16u filler2;
Bit8u cl, ch;
Bit16u filler3;
Bit8u al, ah;
Bit16u filler4;
} r8;
} u;
-} __attribute__((packed)) pushad_regs_t;
+} pushad_regs_t;
static inline Bit32u read_dword(Bit16u seg, Bit16u off)
{
uint32_t *addr = (uint32_t *)ADDR_FROM_SEG_OFF(seg,off);
return *addr;
}
static inline Bit16u read_word(Bit16u seg, Bit16u off)
{
uint16_t *addr = (uint16_t *)ADDR_FROM_SEG_OFF(seg,off);