Skip to contentSkip to conversation

rombios: remove packed attribute for pushad_regs_t

PATCH In review Wei Liu 2 participants 2 messages Aug 28, 2018

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH v2 1/1 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);
                                                   ^~~~~~~~~~~~~~~
---
 tools/firmware/rombios/32bit/rombios_compat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/firmware/rombios/32bit/rombios_compat.h +1 -1
index c0ae4151b5..3fe7d67721 100644
@@ -52,7 +52,7 @@ typedef struct {
     Bit16u filler4;
     } r8;
   } u;
-} __attribute__((packed)) pushad_regs_t;
+} pushad_regs_t;
 
 
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v2 1/1
#1 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 28.08.18 at 15:56, <[email protected]> wrote:

The structure already has explicitly padding.

Removing the attribute silences a clang 6 warning:

Quoted 7 lines

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);
                                                   ^~~~~~~~~~~~~~~

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel