From 658df95a4adb825f0c8a5faea7b545da6d1d5003 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Thu, 25 Feb 2016 09:42:22 +0100 Subject: 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 Signed-off-by: Lars Schneider Signed-off-by: Junio C Hamano --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fc2f1ab2c3..7dc5b88e58 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 -- cgit v1.2.3