From 2ae121c7aa93a0d0cacde7f5818843225ad630d3 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 13 Jan 2017 14:26:33 +0100 Subject: make: Enable additional GCC warnings Enable some sensible GCC warnings for default build. The list of flags was based on the flags from the nftables source. Signed-off-by: Tobias Klauser --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0f53165..a991a08 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,12 @@ ifeq ($(DEBUG), 1) CFLAGS_MIN += -g -DDEBUG endif -CFLAGS ?= -O2 +CFLAGS_WARN := -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ + -Wdeclaration-after-statement -Wsign-compare -Winit-self \ + -Wformat-nonliteral -Wformat-security -Wmissing-format-attribute \ + -Wundef -Wbad-function-cast -Waggregate-return -Wunused -Wwrite-strings + +CFLAGS ?= -O2 $(CFLAGS_WARN) override CFLAGS := $(CFLAGS_MIN) $(CFLAGS) Q ?= @ -- cgit v1.2.3-54-g00ecf