summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-02-26 13:37:27 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-02-26 13:37:27 -0800
commit0f0dd370c84b4068bd80cbab30cb2ea67abedbe0 (patch)
tree9200b08684af983b6bb34017e1d26471b31b3178 /Makefile
parentMerge branch 'dt/initial-ref-xn-commit-doc' (diff)
parentadd DEVELOPER makefile knob to check for acknowledged warnings (diff)
downloadtgif-0f0dd370c84b4068bd80cbab30cb2ea67abedbe0.tar.xz
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