From 3f2f6a235065f5974c3f3e48b5af6f2f4f42ad39 Mon Sep 17 00:00:00 2001 From: Ferry Huberts Date: Tue, 23 Feb 2016 23:55:46 +0100 Subject: [PATCH 1/1] make: remove conditionals in WARNINGS section, no longer needed Signed-off-by: Ferry Huberts --- Makefile.inc | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index cb4882bd..dee2bdbb 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -115,9 +115,7 @@ WARNINGS += -Wendif-labels WARNINGS += -Wwrite-strings WARNINGS += -Wbad-function-cast WARNINGS += -Wpointer-arith -ifneq ($(OS),win32) WARNINGS += -Wcast-qual -endif WARNINGS += -Wshadow WARNINGS += -Wformat WARNINGS += -Wsequence-point @@ -128,42 +126,41 @@ WARNINGS += -Werror=format-security WARNINGS += -Winit-self WARNINGS += -Wswitch-default WARNINGS += -Wundef -ifneq ($(CC),clang) WARNINGS += -Wsync-nand WARNINGS += -Wlogical-op -endif -ifneq ($(OS),android) -ifneq ($(CC),clang) WARNINGS += -Wdouble-promotion WARNINGS += -Wjump-misses-init WARNINGS += -Wtrampolines -endif -endif WARNINGS += -Wunused-parameter + # the following 2 do not work yet and need more work on it #WARNINGS += -Wconversion #WARNINGS += -Wredundant-decls + ifeq ($(MUDFLAP),0) # work around a bug in gcc-4.* WARNINGS += -Wnested-externs endif + # Alas, htons() triggers this so we can't seriously activate it. #WARNINGS += -Wunreachable-code + WARNINGS += -Winline WARNINGS += -Wdisabled-optimization + # WARNINGS += -Werror + WARNINGS += -funit-at-a-time -ifneq ($(CC),clang) WARNINGS += -finline-functions-called-once WARNINGS += -fearly-inlining -endif + ifeq ($(DEBUG),0) WARNINGS += -fomit-frame-pointer endif + # we have small inline functions in src/lq_route.h which should always be inlined -ifneq ($(CC),clang) WARNINGS += -finline-limit=350 -endif + # These tell gcc to put each function and global variable in a separate section. # The linker can than remove all unreferenced section. But in the olsrd binary # unused doesn't imply unused at all since the function may be used by plugins, @@ -172,6 +169,7 @@ endif # from the source by hand. #WARNINGS += -ffunction-sections #WARNINGS += -fdata-sections + WARNINGS := $(shell CC="$(CC)" "$(TOPDIR)/gcc-warnings" $(WARNINGS)) endif CFLAGS += $(WARNINGS) -- 2.20.1