mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-15 00:04:23 +08:00
btrfs-progs: build: disable -Waddress-of-packed-member by default
Gcc 9 adds the flag to default warnings and this produces a lot of warnings that don't seem to be harmful as we know the address is aligned, but this could be hidden in the function call chain. It's still available under W=1. Issue: #180 Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1d4796978c
commit
9a1d86a9ac
4
Makefile
4
Makefile
@ -69,7 +69,9 @@ TOPDIR := .
|
||||
|
||||
# Disable certain GCC 8 + glibc 2.28 warning for snprintf()
|
||||
# where string truncation for snprintf() is expected.
|
||||
DISABLE_WARNING_FLAGS := $(call cc-disable-warning, format-truncation)
|
||||
# For GCC9 disable address-of-packed (under W=1)
|
||||
DISABLE_WARNING_FLAGS := $(call cc-disable-warning, format-truncation) \
|
||||
$(call cc-disable-warning, address-of-packed-member)
|
||||
|
||||
# Common build flags
|
||||
CFLAGS = $(SUBST_CFLAGS) \
|
||||
|
@ -54,6 +54,7 @@ warning-1 += $(call cc-option, -Wunused-but-set-variable)
|
||||
warning-1 += $(call cc-disable-warning, missing-field-initializers)
|
||||
warning-1 += $(call cc-disable-warning, format-truncation)
|
||||
warning-1 += $(call cc-disable-warning, sign-compare)
|
||||
warning-2 += $(call cc-option, -Waddress-of-packed-member)
|
||||
|
||||
warning-2 := -Waggregate-return
|
||||
warning-2 += -Wcast-align
|
||||
|
Loading…
Reference in New Issue
Block a user