add DEVELOPER makefile knob to check for acknowledged warnings
[gitweb.git] / Makefile
index fc2f1ab2c31820513758514cd445fc63521b1d19..7dc5b88e58840490331034e8de0282cceb3e0d04 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -380,6 +380,18 @@ ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 STRIP ?= strip
 
+ifdef DEVELOPER
+CFLAGS += -Werror \
+       -Wdeclaration-after-statement \
+       -Wno-format-zero-length \
+       -Wold-style-definition \
+       -Woverflow \
+       -Wpointer-arith \
+       -Wstrict-prototypes \
+       -Wunused \
+       -Wvla
+endif
+
 # Create as necessary, replace existing, make ranlib unneeded.
 ARFLAGS = rcs