diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-03-28 17:34:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-03-28 23:27:28 +0200 |
commit | 1e84c0b8d161e05c19c3aa227cbf7de15cc363a3 (patch) | |
tree | 5dc530560ad1fd29a6b764a67b92c1fa06b4c7ad /sw | |
parent | 43cff69eed2657c3287221b4f37a2543eb1b6f98 (diff) |
-Werror,-Wunused-but-set-variable
...which was apparently meant as a "Possible debugger breakpoint" in
DBG_UTIL-only sw_DebugRedline. The obvious fix is to mark nDummy as volatile,
but increment of a volatile variable is deprecated, so replace those with reads
of the variable, but which triggered false loplugin:casttovoid so fix that too.
Change-Id: I07376e665caa4fd9befaba06d261a50df7a63a10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132237
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index bb139a1b1781..428f67026f29 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -69,13 +69,13 @@ using namespace com::sun::star; const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); for( SwRedlineTable::size_type n = 0; n < rTable.size(); ++n ) { - SwRedlineTable::size_type nDummy = 0; + volatile SwRedlineTable::size_type nDummy = 0; const SwRangeRedline* pCurrent = rTable[ n ]; const SwRangeRedline* pNext = n+1 < rTable.size() ? rTable[ n+1 ] : nullptr; if( pCurrent == pNext ) - ++nDummy; + (void) nDummy; if( n == nWatch ) - ++nDummy; // Possible debugger breakpoint + (void) nDummy; // Possible debugger breakpoint } } |