path: root/
diff options
authorÆvar Arnfjörð Bjarmason <>2018-04-14 19:19:46 (GMT)
committerJunio C Hamano <>2018-04-16 04:54:53 (GMT)
commit26d2e4fb227c1415011a136fa9bb881ee338118a (patch)
treec57278dadabee498e50863e70790e81b592ae5c1 /
parent99f763baf5941455aefd176f9b1e98a4ff81f611 (diff)
Makefile: add a DEVOPTS to get all of -Wextra
Change DEVOPTS to understand a "extra-all" option. When the DEVELOPER flag is enabled we turn on -Wextra, but manually switch some of the warnings it turns on off. This is because we have many existing occurrences of them in the code base. This mode will stop the suppression, let the developer see and decide whether to fix them. This change is a slight alteration of Nguyễn Thái Ngọc Duy EAGER_DEVELOPER mode patch[1] 1. "[PATCH v3 3/3] Makefile: add EAGER_DEVELOPER mode" (<>; Signed-off-by: Ævar Arnfjörð Bjarmason <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to '')
1 files changed, 2 insertions, 0 deletions
diff --git a/ b/
index 7a54426..2d244ca 100644
--- a/
+++ b/
@@ -23,6 +23,7 @@ CFLAGS += -Wextra
# if a function is public, there should be a prototype and the right
# header file should be included. If not, it should be static.
CFLAGS += -Wmissing-prototypes
+ifeq ($(filter extra-all,$(DEVOPTS)),)
# These are disabled because we have these all over the place.
CFLAGS += -Wno-empty-body
CFLAGS += -Wno-missing-field-initializers
@@ -30,6 +31,7 @@ CFLAGS += -Wno-sign-compare
CFLAGS += -Wno-unused-function
CFLAGS += -Wno-unused-parameter
# uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
# not worth fixing since newer compilers correctly stop complaining