From 7214f83b35aceb2ca0a4a3bac61f0ba9f888ec7c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 18 Apr 2016 16:17:31 +0200 Subject: Enable further GCC 6 warnings ...not already automatically enabled through the existing -W switches. The set is assembled from information in . All issues found have already been fixed with earlier commits. Change-Id: I1abb6ba3a12c0ffb2756d06476e395b24e596f8e Reviewed-on: https://gerrit.libreoffice.org/24219 Reviewed-by: Stephan Bergmann Tested-by: Stephan Bergmann --- solenv/gbuild/platform/com_GCC_defs.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'solenv') diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 9d88dfc4bdb0..f23705b3561a 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -87,6 +87,20 @@ gb_LinkTarget_LDFLAGS += -fprofile-arcs -lgcov gb_COMPILEROPTFLAGS := -O0 endif +ifeq ($(shell expr '$(GCC_VERSION)' '>=' 600),1) +gb_CFLAGS_COMMON += \ + -Wduplicated-cond \ + -Wlogical-op \ + -Wnull-dereference \ + -Wshift-overflow=2 +gb_CXXFLAGS_COMMON += \ + -Wduplicated-cond \ + -Wlogical-op \ + -Wnull-dereference \ + -Wshift-overflow=2 \ + -Wunused-const-variable=1 +endif + ifeq ($(HAVE_GCC_VISIBILITY_FEATURE),TRUE) gb_VISIBILITY_FLAGS := -DHAVE_GCC_VISIBILITY_FEATURE -- cgit