summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-18 16:17:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-18 15:47:18 +0000
commit7214f83b35aceb2ca0a4a3bac61f0ba9f888ec7c (patch)
treed387b69ceeaf650a9babf5fe86078b2c10c36ec8
parenta2f7c634b3e20324a803b36112dbd764c2179d26 (diff)
Enable further GCC 6 warnings
...not already automatically enabled through the existing -W switches. The set is assembled from information in <https://gnu.wildebeest.org/blog/mjw/2016/02/15/looking-forward-to-gcc6-many-new-warnings/>. All issues found have already been fixed with earlier commits. Change-Id: I1abb6ba3a12c0ffb2756d06476e395b24e596f8e Reviewed-on: https://gerrit.libreoffice.org/24219 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk14
1 files changed, 14 insertions, 0 deletions
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