summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-05-31 18:17:03 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-05-31 18:17:03 +0200
commit94d9d895edac0b99e0fbc94ff7763292af1fdc5b (patch)
treef3806cd6e5c2acd1fb74f97451ddb719406c35f4
parent967e9e6bbb36eb925c14b43b9baff541d82ee4c0 (diff)
Remove some unnecessary scaffolding around SAL_WARN calls
Change-Id: Iaec105d85a283ad15fdca6ffc5cf3d2ec5acac18
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx2
-rw-r--r--chart2/source/controller/main/ChartController.cxx1
-rw-r--r--comphelper/source/misc/scopeguard.cxx1
-rw-r--r--cppuhelper/source/component.cxx1
-rw-r--r--cppuhelper/source/component_context.cxx1
-rw-r--r--cppuhelper/source/implbase.cxx2
-rw-r--r--cppuhelper/source/weak.cxx1
-rw-r--r--cui/source/options/optinet2.cxx1
-rw-r--r--cui/source/options/optsave.cxx1
-rw-r--r--desktop/source/deployment/dp_log.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx1
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx3
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx1
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx1
-rw-r--r--extensions/source/bibliography/datman.cxx1
-rw-r--r--filter/source/config/cache/filtercache.cxx1
-rw-r--r--forms/source/component/Edit.cxx1
-rw-r--r--oox/source/export/chartexport.cxx3
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx1
-rw-r--r--sd/source/core/stlsheet.cxx1
-rw-r--r--sd/source/helper/simplereferencecomponent.cxx1
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx1
-rw-r--r--sot/source/sdstor/ucbstorage.cxx3
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx1
-rw-r--r--toolkit/source/controls/unocontrols.cxx8
-rw-r--r--ucb/source/ucp/expand/ucpexpand.cxx1
-rw-r--r--unoxml/source/dom/documentbuilder.cxx2
29 files changed, 0 insertions, 50 deletions
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 519dde5bd163..c091fa701007 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -140,7 +140,6 @@ namespace
}
catch( const uno::Exception & ex )
{
- (void)ex; // no warning in non-debug builds
SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
}
}
@@ -167,7 +166,6 @@ namespace
}
catch( const uno::Exception & ex )
{
- (void)ex; // no warning in non-debug builds
SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
}
}
@@ -183,7 +181,6 @@ namespace
}
catch( const uno::Exception & ex )
{
- (void)ex; // no warning in non-debug builds
SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
}
return Color( nResult );
@@ -200,7 +197,6 @@ namespace
}
catch( const uno::Exception & ex )
{
- (void)(ex); // no warning in non-debug builds
SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
}
}
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index 7669bd253674..db43d225b73a 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -187,12 +187,10 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet )
}
catch( const beans::UnknownPropertyException &ex )
{
- (void)ex;
SAL_WARN( "chart2", ex.Message << " - unknown Property: " << aProperty.first);
}
catch( const uno::Exception &ex )
{
- (void)ex;
SAL_WARN( "chart2", ex.Message );
}
}
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 308b64a5ad8e..a385278e8cc9 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -216,7 +216,6 @@ void ChartController::TheModel::tryTermination()
}
catch(const uno::Exception& ex)
{
- (void)ex; // no warning in non-debug builds
SAL_WARN( "chart2", "Termination of model failed: " << ex.Message );
}
}
diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx
index 99e70581024b..2224c0993fff 100644
--- a/comphelper/source/misc/scopeguard.cxx
+++ b/comphelper/source/misc/scopeguard.cxx
@@ -32,7 +32,6 @@ ScopeGuard::~ScopeGuard()
m_func();
}
catch (css::uno::Exception & exc) {
- (void) exc; // avoid warning about unused variable
SAL_WARN( "comphelper", "UNO exception occurred: " << exc.Message );
}
catch (...) {
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index 333812495fa6..7b974ec76586 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -92,7 +92,6 @@ void OComponentHelper::release() throw()
catch (css::uno::RuntimeException & exc)
{
// release should not throw exceptions
- (void) exc; // avoid warning about unused variable
SAL_WARN( "cppuhelper", exc.Message );
}
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index ee964e227c57..952ee693659c 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -573,7 +573,6 @@ extern "C" { static void s_createComponentContext_v(va_list * pParam)
}
catch (Exception & exc)
{
- (void) exc; // avoid warning about unused variable
SAL_WARN( "cppuhelper", exc.Message );
xContext.clear();
}
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index c8b72f61a48f..a64418ffaccd 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -77,7 +77,6 @@ void WeakComponentImplHelperBase::release()
dispose();
}
catch (RuntimeException const& exc) { // don't break throw ()
- (void)exc;
SAL_WARN( "cppuhelper", exc.Message );
}
OSL_ASSERT( rBHelper.bDisposed );
@@ -202,7 +201,6 @@ void WeakAggComponentImplHelperBase::release()
dispose();
}
catch (RuntimeException const& exc) { // don't break throw ()
- (void)exc;
SAL_WARN( "cppuhelper", exc.Message );
}
OSL_ASSERT( rBHelper.bDisposed );
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index 6bd49fa212ec..3eec26d11647 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -243,7 +243,6 @@ void OWeakObject::disposeWeakConnectionPoint()
p->dispose();
}
catch (RuntimeException const& exc) {
- (void)exc;
SAL_WARN( "cppuhelper", exc.Message );
}
p->release();
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 0c2e0b7157a5..ff8368e1b2fc 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -784,7 +784,6 @@ IMPL_STATIC_LINK_NOARG(SvxSecurityTabPage, MacroSecPBHdl, Button*, void)
catch (const Exception& e)
{
SAL_WARN( "cui.options", e.Message);
- (void)e;
}
}
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 52a8d3893c29..fc9fb88fa9be 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -457,7 +457,6 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
}
catch(Exception& e)
{
- (void) e;
SAL_WARN( "cui.options", "exception in FilterFactory access: " << e.Message );
}
diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx
index f84aac3c53ae..c03caaef2461 100644
--- a/desktop/source/deployment/dp_log.cxx
+++ b/desktop/source/deployment/dp_log.cxx
@@ -78,7 +78,6 @@ void ProgressLogImpl::disposing()
}
}
catch (const Exception & exc) {
- (void) exc;
SAL_WARN( "desktop", exc.Message );
}
}
@@ -137,7 +136,6 @@ void ProgressLogImpl::log_write( OString const & text )
}
}
catch (const io::IOException & exc) {
- (void) exc;
SAL_WARN( "desktop", exc.Message );
}
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index ee7d91a43521..2e5f00fc8654 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -741,7 +741,6 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
}
catch (const lang::IllegalArgumentException & exc) {
SAL_WARN( "desktop", exc.Message );
- (void) exc;
}
}
xFilePicker->setCurrentFilter( sDefaultFilter );
@@ -1387,7 +1386,6 @@ bool UpdateRequiredDialog::isEnabled( const uno::Reference< deployment::XPackage
}
catch ( const uno::RuntimeException & ) { throw; }
catch (const uno::Exception & exc) {
- (void) exc;
SAL_WARN( "desktop", exc.Message );
bRegistered = false;
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 28863f9bc59b..4bbae0635642 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -344,7 +344,6 @@ PackageState TheExtensionManager::getPackageState( const uno::Reference< deploym
throw;
}
catch (const uno::Exception & exc) {
- (void) exc;
SAL_WARN( "desktop", exc.Message );
return NOT_AVAILABLE;
}
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 2dd0abd3a945..a49bff015734 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -582,7 +582,6 @@ OUString PackageManagerImpl::detectMediaType(
catch (const lang::IllegalArgumentException & exc) {
if (throw_exc)
throw;
- (void) exc;
SAL_WARN( "desktop", exc.Message );
}
}
@@ -1026,12 +1025,10 @@ PackageManagerImpl::getDeployedPackages_(
}
catch (const lang::IllegalArgumentException & exc) {
// ignore
- (void) exc; // avoid warnings
SAL_WARN( "desktop", exc.Message );
}
catch (const deployment::DeploymentException& exc) {
// ignore
- (void) exc; // avoid warnings
SAL_WARN( "desktop", exc.Message );
}
}
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 93a8060231b1..2c40f9e54798 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1060,7 +1060,6 @@ void BackendImpl::PackageImpl::exportTo(
::cppu::getCaughtException() ) );
}
catch (const lang::IllegalArgumentException & exc) {
- (void) exc;
SAL_WARN( "desktop", exc.Message );
}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index d31baf996b59..d501c1954c64 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -126,7 +126,6 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
xComp->dispose();
}
catch (const RuntimeException & exc) {
- (void) exc;
SAL_WARN( "desktop", exc.Message );
}
}
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index e87e2c82a0a4..2d15f612518c 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -180,7 +180,6 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm)
}
catch (const Exception& e)
{
- (void)e;
SAL_WARN( "extensions.biblio", "::getColumns : catched an exception. " << e.Message);
}
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index cfc5ad0e5513..eb3121fee602 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -880,7 +880,6 @@ css::uno::Any FilterCache::impl_getDirectCFGValue(const OUString& sDirectKey)
{ throw; }
catch(const css::uno::Exception& ex)
{
- (void)ex;
SAL_WARN( "filter.config", ex.Message);
aValue.clear();
}
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index d8a86b4c9634..edf84814e65f 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -447,7 +447,6 @@ namespace
}
catch(const IllegalArgumentException& e)
{
- (void)e;
SAL_WARN( "forms.component", "could not transfer the property named '"
<< pSourceProps->Name
<< "'. " << e.Message );
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index d6eeabb9a96d..a079566182a4 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -192,7 +192,6 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
}
catch( const uno::Exception & ex )
{
- (void)ex; // avoid warning for pro build
SAL_WARN( "oox", "Exception caught. " << ex.Message);
}
@@ -298,7 +297,6 @@ bool lcl_isSeriesAttachedToFirstAxis(
}
catch( const uno::Exception & ex )
{
- (void)ex; // avoid warning for pro build
SAL_WARN( "oox", "Exception caught. " << ex.Message);
}
@@ -640,7 +638,6 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha
}
catch( const uno::Exception & ex )
{
- (void)ex; // avoid warning for pro build
SAL_WARN( "oox", "Exception caught. " << ex.Message);
}
}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 2882b94cb076..03884d510b38 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -986,7 +986,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream()
}
catch ( Exception &ex )
{
- (void)ex;
SAL_WARN( "package", "Exception is thrown during stream wrapping!" << ex.Message);
return uno::Reference < io::XInputStream > ();
}
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 477335994037..5c88bba0505f 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -712,7 +712,6 @@ void SAL_CALL SdStyleSheet::release( ) throw ()
}
catch (RuntimeException const& exc)
{ // don't break throw ()
- (void)exc;
SAL_WARN( "sd", exc.Message );
}
OSL_ASSERT( mrBHelper.bDisposed );
diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx
index d17abdc8aadc..4d0234743e83 100644
--- a/sd/source/helper/simplereferencecomponent.cxx
+++ b/sd/source/helper/simplereferencecomponent.cxx
@@ -54,7 +54,6 @@ void SimpleReferenceComponent::release()
}
catch (RuntimeException & exc ) // don't break throw ()
{
- (void)exc;
SAL_WARN( "sd", exc.Message );
}
}
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 3291114a9f94..2c85154539bf 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -320,7 +320,6 @@ void SAL_CALL SdXImpressDocument::release() throw ( )
}
catch (const uno::RuntimeException& exc)
{ // don't break throw ()
- (void)exc;
SAL_WARN( "sd", exc.Message );
}
}
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index d1cbadd41856..7c365eb8ac79 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -789,7 +789,6 @@ void UCBStorageStream_Impl::ReadSourceWriteTemporary()
catch (const Exception &e)
{
SAL_WARN( "sot", e.Message );
- (void)e;
}
}
@@ -825,7 +824,6 @@ sal_uInt64 UCBStorageStream_Impl::ReadSourceWriteTemporary(sal_uInt64 aLength)
catch( const Exception & e )
{
SAL_WARN( "sot", e.Message );
- (void)e;
}
}
@@ -874,7 +872,6 @@ std::size_t UCBStorageStream_Impl::GetData(void* pData, std::size_t const nSize)
catch (const Exception &e)
{
SAL_WARN( "sot", e.Message );
- (void)e;
}
if( aResult < nSize )
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 232b62d13d18..f76d612e3453 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1175,7 +1175,6 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
catch (const Exception& rExcept)
{
SAL_WARN("sw", rExcept.Message);
- (void)rExcept;
}
}
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 88618b87af8b..bf131832726e 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -2931,11 +2931,7 @@ void UnoListBoxControl::itemStateChanged( const awt::ItemEvent& rEvent )
}
catch( const Exception& e )
{
-#if OSL_DEBUG_LEVEL == 0
- (void) e; // suppress warning
-#else
SAL_WARN( "toolkit", "UnoListBoxControl::itemStateChanged: caught an exception: " << e.Message);
-#endif
}
}
}
@@ -3271,11 +3267,7 @@ void UnoComboBoxControl::itemStateChanged( const awt::ItemEvent& rEvent )
}
catch( const Exception& e )
{
-#if OSL_DEBUG_LEVEL == 0
- (void) e; // suppress warning
-#else
SAL_WARN( "toolkit", "UnoComboBoxControl::itemStateChanged: caught an exception: " << e.Message);
-#endif
}
}
}
diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx
index 85b39f42b478..9951fb28ff77 100644
--- a/ucb/source/ucp/expand/ucpexpand.cxx
+++ b/ucb/source/ucp/expand/ucpexpand.cxx
@@ -202,7 +202,6 @@ sal_Int32 ExpandContentProviderImpl::compareContentIds(
}
catch (const ucb::IllegalIdentifierException & exc)
{
- (void) exc; // unused
SAL_WARN( "ucb", exc.Message );
return -1;
}
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index 2a1e3826bd98..006e5c7fe086 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -201,7 +201,6 @@ namespace DOM
memcpy(buffer, chunk.getConstArray(), nread);
return nread;
} catch (const css::uno::Exception& ex) {
- (void) ex;
SAL_WARN( "unoxml", ex.Message);
return -1;
}
@@ -221,7 +220,6 @@ namespace DOM
delete pctx;
return 0;
} catch (const css::uno::Exception& ex) {
- (void) ex;
SAL_WARN( "unoxml", ex.Message);
return -1;
}