Merge branch 'ls/makefile-cflags-developer-tweak'
authorJunio C Hamano <gitster@pobox.com>
Fri, 26 Feb 2016 21:37:27 +0000 (13:37 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Feb 2016 21:37:27 +0000 (13:37 -0800)
There is a new DEVELOPER knob that enables many compiler warning
options in the Makefile.

* ls/makefile-cflags-developer-tweak:
add DEVELOPER makefile knob to check for acknowledged warnings

1  2 
Makefile
diff --combined Makefile
index 10566d648175fc561fde6a1498996e2bb43b880d,7dc5b88e58840490331034e8de0282cceb3e0d04..24bef8d4282baa7702d4386193c4291275c708c7
+++ b/Makefile
@@@ -380,6 -380,18 +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
  
@@@ -583,7 -595,6 +595,7 @@@ TEST_PROGRAMS_NEED_X += test-delt
  TEST_PROGRAMS_NEED_X += test-dump-cache-tree
  TEST_PROGRAMS_NEED_X += test-dump-split-index
  TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
 +TEST_PROGRAMS_NEED_X += test-fake-ssh
  TEST_PROGRAMS_NEED_X += test-genrandom
  TEST_PROGRAMS_NEED_X += test-hashmap
  TEST_PROGRAMS_NEED_X += test-index-version