[PATCH] gcc-9: silence 'address-of-packed-member' warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux