diff mbox series

[3/3] btrfs-progs: enable -Wshadow for default build

Message ID 5a97e0bcbf28f018ce9cf30106b4c5142d2c5299.1694428549.git.wqu@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: fix all -Wshadow warnings and enable -Wshadow for default builds | expand

Commit Message

Qu Wenruo Sept. 11, 2023, 10:40 a.m. UTC
With all the known one fixed, we can enable -Wshadow now.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 Makefile           | 3 ++-
 Makefile.extrawarn | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 8cd5674616be..e178b7e13777 100644
--- a/Makefile
+++ b/Makefile
@@ -86,7 +86,8 @@  DISABLE_WARNING_FLAGS := $(call cc-disable-warning, format-truncation) \
 
 # Warnings that we want by default
 ENABLE_WARNING_FLAGS := $(call cc-option, -Wimplicit-fallthrough) \
-			$(call cc-option, -Wmissing-prototypes)
+			$(call cc-option, -Wmissing-prototypes) \
+			-Wshadow
 
 ASFLAGS =
 
diff --git a/Makefile.extrawarn b/Makefile.extrawarn
index 9cd279171e57..44bc8cff188f 100644
--- a/Makefile.extrawarn
+++ b/Makefile.extrawarn
@@ -60,7 +60,6 @@  warning-2 := -Waggregate-return
 warning-2 += -Wcast-align
 warning-2 += -Wdisabled-optimization
 warning-2 += -Wnested-externs
-warning-2 += -Wshadow
 warning-2 += $(call cc-option, -Wlogical-op)
 warning-2 += $(call cc-option, -Wmissing-field-initializers)
 warning-2 += $(call cc-option, -Wformat-truncation)