From e943a42e2bd7db27679c3b99ef97f955db1244f4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 2 Jul 2017 22:29:26 +0200 Subject: loplugin:casttovoid: svl Change-Id: Iec49ad76f102dc228d41beb10d7e99ed197c0ea8 --- svl/qa/unit/items/test_IndexedStyleSheets.cxx | 3 +-- svl/qa/unit/notify/test_SfxBroadcaster.cxx | 3 +-- svl/source/misc/filenotation.cxx | 1 - svl/source/numbers/zforfind.cxx | 3 +-- svl/source/numbers/zforlist.cxx | 1 - svl/source/undo/undo.cxx | 6 ++---- 6 files changed, 5 insertions(+), 12 deletions(-) (limited to 'svl') diff --git a/svl/qa/unit/items/test_IndexedStyleSheets.cxx b/svl/qa/unit/items/test_IndexedStyleSheets.cxx index d7cccebaa833..4cf9a9621bf0 100644 --- a/svl/qa/unit/items/test_IndexedStyleSheets.cxx +++ b/svl/qa/unit/items/test_IndexedStyleSheets.cxx @@ -30,8 +30,7 @@ class MockedStyleSheet : public SfxStyleSheetBase }; struct DummyPredicate : public StyleSheetPredicate { - bool Check(const SfxStyleSheetBase& styleSheet) override { - (void)styleSheet; // fix compiler warning + bool Check(const SfxStyleSheetBase&) override { return true; } }; diff --git a/svl/qa/unit/notify/test_SfxBroadcaster.cxx b/svl/qa/unit/notify/test_SfxBroadcaster.cxx index 0e1491d7f00d..58c8df532590 100644 --- a/svl/qa/unit/notify/test_SfxBroadcaster.cxx +++ b/svl/qa/unit/notify/test_SfxBroadcaster.cxx @@ -42,8 +42,7 @@ public: MockedSfxListener() : mNotifyWasCalled(false) {} - void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override { - (void)(rBC); (void)(rHint); // avoid warnings about unused parameters + void Notify(SfxBroadcaster&, const SfxHint&) override { mNotifyWasCalled = true; } diff --git a/svl/source/misc/filenotation.cxx b/svl/source/misc/filenotation.cxx index d77f96e97f75..e99415de09a3 100644 --- a/svl/source/misc/filenotation.cxx +++ b/svl/source/misc/filenotation.cxx @@ -103,7 +103,6 @@ namespace svt } OSL_ENSURE( bSuccess, "OFileNotation::OFileNotation: could not detect the format!" ); - (void)bSuccess; } OUString OFileNotation::get(NOTATION _eOutputNotation) diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 08fc26e20435..c0c7b4816841 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -470,10 +470,9 @@ bool ImpSvNumberInputScan::StringContainsWord( const OUString& rWhat, return false; // Alpha or numeric is not word gap. sal_Int32 nIndex = nPos; - const sal_uInt32 uc = rString.iterateCodePoints( &nIndex); + rString.iterateCodePoints( &nIndex); if (nPos+1 < nIndex) return true; // Surrogate, assume these to be new words. - (void)uc; const sal_Int32 nType = pFormatter->GetCharClass()->getCharacterType( rString, nPos); using namespace ::com::sun::star::i18n; diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 3d582a33da0f..adb0c86f12a6 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -502,7 +502,6 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage ) } } DBG_ASSERT( bCheck, "SvNumberFormatter::ReplaceSystemCL: couldn't convert" ); - (void)bCheck; delete pOldEntry; } diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index cb227fc5a2d3..0c4fe1e7a53d 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -95,9 +95,8 @@ void SfxUndoAction::Undo() } -void SfxUndoAction::UndoWithContext( SfxUndoContext& i_context ) +void SfxUndoAction::UndoWithContext( SfxUndoContext& ) { - (void)i_context; Undo(); } @@ -109,9 +108,8 @@ void SfxUndoAction::Redo() } -void SfxUndoAction::RedoWithContext( SfxUndoContext& i_context ) +void SfxUndoAction::RedoWithContext( SfxUndoContext& ) { - (void)i_context; Redo(); } -- cgit