stop overriding non test warning flags

This commit is contained in:
Vincent Sanders 2018-09-07 14:25:41 +01:00
parent e4537cb37e
commit c3d3023e4a

View File

@ -127,15 +127,15 @@ endef
$(eval $(call pkg_cfg_detect_lib,check,Check))
COMMON_WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wcast-align \
TEST_WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wcast-align \
-Wwrite-strings -Wmissing-declarations -Wuninitialized
ifneq ($(CC_MAJOR),2)
COMMON_WARNFLAGS += -Wno-unused-parameter
TEST_WARNFLAGS += -Wno-unused-parameter
endif
BASE_TESTCFLAGS := -std=c99 -g \
$(COMMON_WARNFLAGS) \
$(TEST_WARNFLAGS) \
-D_DEFAULT_SOURCE \
-D_POSIX_C_SOURCE=200809L \
-D_XOPEN_SOURCE=600 \
@ -156,7 +156,7 @@ TESTLDFLAGS := -L$(TESTROOT) \
# malloc faliure injection generator
$(TESTROOT)/libmalloc_fig.so:test/malloc_fig.c
$(CC) -shared -fPIC -I. -std=c99 $(COMMON_WARNFLAGS) $^ -o $@
$(CC) -shared -fPIC -I. -std=c99 $(TEST_WARNFLAGS) $^ -o $@
# Source files for all tests being compiled
TESTSOURCES :=