Enable extra global compiler warnings

Enable some extra compiler warnings in the global Makefile. These are
supported by GCC and Clang. The global Makefile is almost solely used by
developers and the CI, so the interaction with the preexisting -Werror
flag is desirable.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
Christian Göttsche 2021-11-12 16:41:53 +01:00 committed by James Carter
parent fb68d036b8
commit cee0fe36a7
1 changed files with 4 additions and 0 deletions

View File

@ -9,8 +9,12 @@ ifeq ($(DEBUG),1)
export LDFLAGS = -g
else
export CFLAGS ?= -O2 -Werror -Wall -Wextra \
-Wfloat-equal \
-Wformat=2 \
-Winit-self \
-Wmissing-format-attribute \
-Wmissing-noreturn \
-Wnull-dereference \
-Wpointer-arith \
-Wshadow \
-Wstrict-prototypes \