Commit bac571ac authored by Paul Beesley's avatar Paul Beesley Committed by TrustedFirmware Code Review
Browse files

Merge "Makefile: Add default warning flags" into integration

parents 4d384eb4 00296576
......@@ -220,23 +220,19 @@ ASFLAGS_aarch32 = $(march32-directive)
ASFLAGS_aarch64 = $(march64-directive)
WARNING1 := -Wextra
WARNING1 += -Wunused -Wno-unused-parameter
WARNING1 += -Wmissing-declarations
WARNING1 += -Wmissing-format-attribute
WARNING1 += -Wmissing-prototypes
WARNING1 += -Wold-style-definition
WARNING1 += -Wunused-but-set-variable
WARNING1 += -Wunused-const-variable
WARNING2 := -Waggregate-return
WARNING2 += -Wcast-align
WARNING2 += -Wdisabled-optimization
WARNING2 += -Wnested-externs
WARNING2 += -Wshadow
WARNING2 += -Wlogical-op
WARNING2 += -Wmissing-field-initializers
WARNING2 += -Wsign-compare
WARNING2 += -Wmaybe-uninitialized
WARNING3 := -Wbad-function-cast
WARNING3 += -Wcast-qual
......@@ -246,8 +242,6 @@ WARNING3 += -Wpadded
WARNING3 += -Wpointer-arith
WARNING3 += -Wredundant-decls
WARNING3 += -Wswitch-default
WARNING3 += -Wpacked-bitfield-compat
WARNING3 += -Wvla
ifeq (${W},1)
WARNINGS := $(WARNING1)
......@@ -257,6 +251,16 @@ else ifeq (${W},3)
WARNINGS := $(WARNING1) $(WARNING2) $(WARNING3)
endif
WARNINGS += -Wunused -Wno-unused-parameter \
-Wdisabled-optimization \
-Wvla
ifeq ($(findstring clang,$(notdir $(CC))),)
WARNINGS += -Wunused-but-set-variable \
-Wmaybe-uninitialized \
-Wpacked-bitfield-compat
endif
ifneq (${E},0)
ERRORS := -Werror
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment