summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-03-16 17:01:33 +0100
committerTobias Klauser <tklauser@distanz.ch>2017-03-16 17:01:33 +0100
commit06e429d4dd93913c0ec17a072f064f411ac1b46e (patch)
tree258cc3477b880260a1941b6f3a3b2cb134dcac38
parentb4ab24150d0182306a4408db5f54ee5553063307 (diff)
make: add -Wextra to CFLAGS_WARN, sort additional warning flags
Enable -Wextra, sort warning flags in CFLAGS_WARN alphabetically to avoid adding duplicates. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f29177e..64ed752 100644
--- a/Makefile
+++ b/Makefile
@@ -34,10 +34,20 @@ ifeq ($(DEBUG), 1)
CFLAGS_MIN += -g -DDEBUG
endif
-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_WARN := -Wextra \
+ -Waggregate-return \
+ -Wbad-function-cast \
+ -Wdeclaration-after-statement \
+ -Wformat-nonliteral \
+ -Wformat-security \
+ -Wmissing-declarations \
+ -Wmissing-format-attribute \
+ -Wmissing-prototypes \
+ -Wsign-compare \
+ -Wstrict-prototypes \
+ -Wundef \
+ -Wunused \
+ -Wwrite-strings
CFLAGS ?= -O2 $(CFLAGS_WARN)
override CFLAGS := $(CFLAGS_MIN) $(CFLAGS)