summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-01-13 14:26:33 +0100
committerTobias Klauser <tklauser@distanz.ch>2017-01-13 14:31:15 +0100
commit2ae121c7aa93a0d0cacde7f5818843225ad630d3 (patch)
tree72962e2d53bd3e4c4d64f507d9d7d9e173127617 /Makefile
parent9354daa2786189277d614cebf9b692587cb9bd4d (diff)
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 <tklauser@distanz.ch>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
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 ?= @