Skip to content

Commit 6f303d6

Browse files
committed
gcc-9: silence 'address-of-packed-member' warning
We already did this for clang, but now gcc has that warning too. Yes, yes, the address may be unaligned. And that's kind of the point. Signed-off-by: Linus Torvalds <[email protected]>
1 parent f2bc9c9 commit 6f303d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
678678
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
679679
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
680680
KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
681+
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
681682

682683
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
683684
KBUILD_CFLAGS += -Os
@@ -719,7 +720,6 @@ ifdef CONFIG_CC_IS_CLANG
719720
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
720721
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
721722
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
722-
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
723723
# Quiet clang warning: comparison of unsigned expression < 0 is always false
724724
KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
725725
# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the

0 commit comments

Comments
 (0)