diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-03-16 17:01:33 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2017-03-16 17:01:33 +0100 |
commit | 06e429d4dd93913c0ec17a072f064f411ac1b46e (patch) | |
tree | 258cc3477b880260a1941b6f3a3b2cb134dcac38 /Makefile | |
parent | b4ab24150d0182306a4408db5f54ee5553063307 (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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -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) |