From 06e429d4dd93913c0ec17a072f064f411ac1b46e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 16 Mar 2017 17:01:33 +0100 Subject: 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 --- Makefile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Makefile') 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) -- cgit v1.2.3-54-g00ecf