aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLars Schneider <larsxschneider@gmail.com>2016-02-25 09:42:22 +0100
committerJunio C Hamano <gitster@pobox.com>2016-02-25 12:49:45 -0800
commit658df95a4adb825f0c8a5faea7b545da6d1d5003 (patch)
tree7a1df49eaa3ccdf81c01399d1ffd1d1318fe3459 /Makefile
parent48c39e98c6aff98b5dd165435373e517780302ad (diff)
downloadgit-658df95a4adb825f0c8a5faea7b545da6d1d5003.tar.gz
git-658df95a4adb825f0c8a5faea7b545da6d1d5003.tar.xz
add DEVELOPER makefile knob to check for acknowledged warnings
We assume Git developers have a reasonably modern compiler and recommend them to enable the DEVELOPER makefile knob to ensure their patches are clear of all compiler warnings the Git core project cares about. Enable the DEVELOPER makefile knob in the Travis-CI build. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index fc2f1ab2c..7dc5b88e5 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