mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] gcc-9: silence 'address-of-packed-member' warning
@ 2019-09-12  6:54 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2019-09-12  6:54 UTC (permalink / raw)
  To: Barebox List; +Cc: Andrey Smirnov

As done in the Linux Kernel. Most of the packed structures we have
are optimized to not generate any unaligned accesses, so this warning
produces a lot of false positives which are hard to fix in the code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 5ca5fab717..aa50aa73ed 100644
--- a/Makefile
+++ b/Makefile
@@ -478,6 +478,8 @@ CFLAGS += $(call cc-disable-warning, trampolines)
 
 CFLAGS += $(call cc-option, -fno-delete-null-pointer-checks,)
 
+CFLAGS   += $(call cc-disable-warning, address-of-packed-member)
+
 # arch Makefile may override CC so keep this after arch Makefile is included
 NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 CHECKFLAGS     += $(NOSTDINC_FLAGS)
-- 
2.23.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-12  6:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12  6:54 [PATCH] gcc-9: silence 'address-of-packed-member' warning Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox