[Libreoffice-commits] core.git: sw/source

Tor Lillqvist tlillqvist at suse.com
Sun Aug 18 02:35:13 PDT 2013


 sw/source/core/doc/docfld.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 54d8baf8ad4e17ae7367ffa69e74b4e4f367a653
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Sun Aug 18 12:28:08 2013 +0300

    WaE: C4703: potentially uninitialized local pointer variable 'pSectNd' used
    
    I think the compiler is wrong here. I don't think there is a way the
    line can be reached without pSectNd being assigned a value. Let's
    silence the warning anyway as we want to be buildable warning-free.
    
    Change-Id: I6802c31feccdbf9727a02819fe0051b6edba3730

diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 4a7cf24..d917a71 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -2218,7 +2218,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
         // from top to bottom
         std::vector<sal_uLong> aTmpArr;
         SwSectionFmts& rArr = rDoc.GetSections();
-        SwSectionNode* pSectNd;
+        SwSectionNode* pSectNd = 0;
         sal_uInt16 nArrStt = 0;
         sal_uLong nSttCntnt = rDoc.GetNodes().GetEndOfExtras().GetIndex();
 


More information about the Libreoffice-commits mailing list