summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-09-28 12:28:06 +0200
committerMichael Stahl <mstahl@redhat.com>2016-09-28 12:28:59 +0200
commit0145d83cc7872bf943de12e386645a7aa8868f5d (patch)
tree99c9426e4bbcbb663a637a3f10c7ff2641719ff2 /sw
parent0b136fccf87b7341433e5a2aed8ec6b500940205 (diff)
sw: -Werror=unused-parameter
Change-Id: I1d437077ac1bf7bf6a53e1348ccbdce7b8b20bc3
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/bookmrk.cxx16
-rw-r--r--sw/source/core/doc/docbm.cxx1
2 files changed, 8 insertions, 9 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 936e48f1bbb2..ba6bea988309 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 d8bebf486286..b4660b068134 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;
};
}