From bb0816673dc755f109fb1c8a78154a932119fd2e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 12 Sep 2016 15:38:13 +0200 Subject: Disable GCC 6 -Wnull-dereference again for now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...at least with both gcc-6.1.1-3.fc24.x86_64 and a recent GCC 7 trunk build it produces lots of incomprehensible (potentially false positive) occurrences in a --disable-debug build, like > [CXX] store/source/stordir.cxx > In file included from /home/sbergman/lo/core/store/source/stordir.hxx:30:0, > from /home/sbergman/lo/core/store/source/stordir.cxx:20: > /home/sbergman/lo/core/store/source/storbase.hxx: In member function ‘storeError store::OStoreDirectory_Impl::create(store::OStorePageManager*, rtl_String*, rtl_String*, storeAccessMode)’: > /home/sbergman/lo/core/store/source/storbase.hxx:237:23: error: potential null pointer dereference [-Werror=null-dereference] > m_nUsed = rhs.m_nUsed; > ~~~~^~~~~~~ > /home/sbergman/lo/core/store/source/storbase.hxx:236:23: error: potential null pointer dereference [-Werror=null-dereference] > m_nSize = rhs.m_nSize; > ~~~~^~~~~~~ > /home/sbergman/lo/core/store/source/storbase.hxx:235:23: error: potential null pointer dereference [-Werror=null-dereference] > m_nAddr = rhs.m_nAddr; > ~~~~^~~~~~~ > [...] > [CXX] store/source/storlckb.cxx > In file included from /home/sbergman/lo/core/store/source/storlckb.hxx:29:0, > from /home/sbergman/lo/core/store/source/storlckb.cxx:20: > /home/sbergman/lo/core/store/source/storbase.hxx: In member function ‘storeError store::OStoreLockBytes::readAt(sal_uInt32, void*, sal_uInt32, sal_uInt32&)’: > /home/sbergman/lo/core/store/source/storbase.hxx:595:26: error: potential null pointer dereference [-Werror=null-dereference] > return isA(p) ? static_cast(p) : 0; > ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ "NULL dereference warnings" looks like this is a known problem. Change-Id: I5eb0c9def7dd12e3a440d280e3fa2331317031b4 --- solenv/gbuild/platform/com_GCC_defs.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'solenv') diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index d44b3ee986d3..5f00cf433f1e 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -88,12 +88,10 @@ 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 -- cgit