From cc8c4459e1147857b5e917e1c2744e442935fd57 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 18 Aug 2019 01:14:45 -0400 Subject: [PATCH] make safe_flag treat unknown warnings as missing --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eded4f7..5792006 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ CONFIG_N_ARENA := 4 CONFIG_STATS := false define safe_flag -$(shell $(CC) -E $1 - /dev/null 2>&1 && echo $1 || echo $2) +$(shell $(CC) $(if $(filter clang,$(CC)),-Werror=unknown-warning-option) -E $1 - /dev/null 2>&1 && echo $1 || echo $2) endef CPPFLAGS := $(CPPFLAGS) -D_GNU_SOURCE