summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-26 13:37:27 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-26 13:37:27 -0800
commit0f0dd370c84b4068bd80cbab30cb2ea67abedbe0 (patch)
tree9200b08684af983b6bb34017e1d26471b31b3178 /Makefile
parent69616f7436ed52476180f602727b387408266873 (diff)
parent658df95a4adb825f0c8a5faea7b545da6d1d5003 (diff)
downloadgit-0f0dd370c84b4068bd80cbab30cb2ea67abedbe0.tar.gz
Merge branch 'ls/makefile-cflags-developer-tweak'
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 10566d6481..24bef8d428 100644
--- 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