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

Michael Stahl mstahl at redhat.com
Wed Sep 28 10:33:49 UTC 2016


 sw/source/core/crsr/bookmrk.cxx |   16 +++++++---------
 sw/source/core/doc/docbm.cxx    |    1 +
 2 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 0145d83cc7872bf943de12e386645a7aa8868f5d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Sep 28 12:28:06 2016 +0200

    sw: -Werror=unused-parameter
    
    Change-Id: I1d437077ac1bf7bf6a53e1348ccbdce7b8b20bc3

diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 936e48f..ba6bea9 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -103,13 +103,12 @@ namespace
 
         const SwPosition& rStart = pField->GetMarkStart();
         SwTextNode const*const pStartTextNode = rStart.nNode.GetNode().GetTextNode();
-        sal_Unicode ch_start = 0;
-        if( pStartTextNode )
-            ch_start = pStartTextNode->GetText()[rStart.nContent.GetIndex()];
-
+        assert(pStartTextNode);
         if (aEndMark != CH_TXT_ATR_FORMELEMENT)
         {
-            assert(ch_start == aStartMark);
+            (void) aStartMark;
+            (void) pStartTextNode;
+            assert(pStartTextNode->GetText()[rStart.nContent.GetIndex()] == aStartMark);
             SwPaM aStart(rStart, rStart);
             ++aStart.End()->nContent;
             io_pDoc->getIDocumentContentOperations().DeleteRange(aStart);
@@ -117,13 +116,12 @@ namespace
 
         const SwPosition& rEnd = pField->GetMarkEnd();
         SwTextNode const*const pEndTextNode = rEnd.nNode.GetNode().GetTextNode();
+        assert(pEndTextNode);
         const sal_Int32 nEndPos = ( rEnd == rStart ||  rEnd.nContent.GetIndex() == 0 )
                                    ? rEnd.nContent.GetIndex()
                                    : rEnd.nContent.GetIndex() - 1;
-        sal_Unicode ch_end = 0;
-        if ( pEndTextNode )
-            ch_end = pEndTextNode->GetText()[nEndPos];
-        assert(ch_end == aEndMark);
+        assert(pEndTextNode->GetText()[nEndPos] == aEndMark);
+        (void) pStartTextNode;
         SwPaM aEnd(rEnd, rEnd);
         if (aEnd.Start()->nContent > 0)
             --aEnd.Start()->nContent;
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index d8bebf4..b4660b0 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -291,6 +291,7 @@ namespace
         }
 #endif
         assert(std::is_sorted(vMarks.begin(), vMarks.end(), lcl_MarkOrderingByStart));
+        (void) vMarks;
     };
 }
 


More information about the Libreoffice-commits mailing list