diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:32:52 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:32:52 +0200 |
commit | 90c91f6b867ebbcd8fa64d8b9ed4dd9b8aa4f6ef (patch) | |
tree | 42ceb69f890a1959661a6f4cb10ed79ec7ce861d /dbaccess | |
parent | eef90bd694536c73922b681581138957b711f144 (diff) |
loplugin:casttovoid: dbaccess
Change-Id: I63f14e06feccdd19ef62ac335fe71bfcec8c580a
Diffstat (limited to 'dbaccess')
22 files changed, 20 insertions, 77 deletions
diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx index 6042d163c8e4..b62b70eeb5fb 100644 --- a/dbaccess/source/core/api/HelperCollections.cxx +++ b/dbaccess/source/core/api/HelperCollections.cxx @@ -98,7 +98,6 @@ namespace dbaccess OSQLTables::iterator aIter = m_aTables.find(_rName); OSL_ENSURE(aIter != m_aTables.end(),"Table not found!"); OSL_ENSURE(aIter->second.is(),"Table is null!"); - (void)aIter; return connectivity::sdbcx::ObjectType(m_aTables.find(_rName)->second,UNO_QUERY); } return nullptr; diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 9f63adbc7d5a..c4b7fdb65a1e 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -1278,7 +1278,6 @@ void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection ) } } OSL_ENSURE( bSuccess, "ORowSetBase::positionCache: failed!" ); - (void)bSuccess; SAL_INFO("dbaccess", "ORowSetBase::positionCache() Clone = " << m_bClone); } diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 0b0a97569cc4..5d3e6e121dac 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -614,9 +614,8 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const OUString& _r { parseAndCheck_throwError( m_aSqlParser, composeStatementFromParts( aAdditiveClauses ), m_aAdditiveIterator, *this ); } - catch( const Exception& e ) + catch( const Exception& ) { - (void)e; SAL_WARN("dbaccess", "OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" ); DBG_UNHANDLED_EXCEPTION(); // every part of the additive statement should have passed other tests already, and should not @@ -692,9 +691,8 @@ void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const { parseAndCheck_throwError( m_aSqlParser, aSql.makeStringAndClear(), m_aAdditiveIterator, *this ); } - catch( const Exception& e ) + catch( const Exception& ) { - (void)e; SAL_WARN("dbaccess", "OSingleSelectQueryComposer::setSingleAdditiveClause: there should be no error anymore for the additive statement!" ); // every part of the additive statement should have passed other tests already, and should not // be able to cause any errors ... me thinks diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index 1bc5d1d3a7d1..d80677ecb746 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -504,9 +504,8 @@ void ODBTableDecorator::fillPrivileges() const } } } - catch(const SQLException& e) + catch(const SQLException&) { - (void)e; SAL_WARN("dbaccess", "ODBTableDecorator::ODBTableDecorator : could not collect the privileges !"); } } diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index eb20c7a1fa21..9016d2bfba34 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -253,7 +253,6 @@ void SAL_CALL OQuery::disposing( const EventObject& _rSource ) { MutexGuard aGuard(m_aMutex); - (void)_rSource; OSL_ENSURE(_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinition, UNO_QUERY).get(), "OQuery::disposing : where did this call come from ?"); diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 6146002303ad..3608a06e9ffe 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -532,10 +532,6 @@ namespace ++object ) { -#if OSL_DEBUG_LEVEL > 0 - const OUString& rName( object->first ); (void)rName; -#endif - const TContentPtr& rDefinition( object->second ); const OUString& rPersistentName( rDefinition->m_aProps.sPersistentName ); diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 216183adaf52..e16edc795661 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -2063,10 +2063,8 @@ void ODocumentDefinition::updateDocumentTitle() xTitle->setTitle(sName); } -void SAL_CALL ODocumentDefinition::queryClosing( const lang::EventObject& Source, sal_Bool GetsOwnership ) +void SAL_CALL ODocumentDefinition::queryClosing( const lang::EventObject&, sal_Bool ) { - (void) Source; - (void) GetsOwnership; try { if ( !close() ) diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx index a3f1d66c1201..d4b06a90ad01 100644 --- a/dbaccess/source/core/recovery/settingsimport.cxx +++ b/dbaccess/source/core/recovery/settingsimport.cxx @@ -75,9 +75,8 @@ namespace dbaccess } // IgnoringSettingsImport - ::rtl::Reference< SettingsImport > IgnoringSettingsImport::nextState( const OUString& i_rElementName ) + ::rtl::Reference< SettingsImport > IgnoringSettingsImport::nextState( const OUString& ) { - (void)i_rElementName; return this; } @@ -117,10 +116,9 @@ namespace dbaccess { } - ::rtl::Reference< SettingsImport > ConfigItemImport::nextState( const OUString& i_rElementName ) + ::rtl::Reference< SettingsImport > ConfigItemImport::nextState( const OUString& ) { OSL_FAIL( "ConfigItemImport::nextState: unexpected: this class is responsible for child-less items only!" ); - (void)i_rElementName; return new IgnoringSettingsImport; } diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx index c93248e5d18a..b88a4152060d 100644 --- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx +++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx @@ -307,10 +307,9 @@ namespace dbaccess m_aStates.push( pNewState ); } - void SAL_CALL SettingsDocumentHandler::endElement( const OUString& i_Name ) + void SAL_CALL SettingsDocumentHandler::endElement( const OUString& ) { ENSURE_OR_THROW( !m_aStates.empty(), "no active element" ); - (void)i_Name; ::rtl::Reference< SettingsImport > pCurrentState( m_aStates.top() ); pCurrentState->endElement(); @@ -325,23 +324,17 @@ namespace dbaccess pCurrentState->characters( i_Chars ); } - void SAL_CALL SettingsDocumentHandler::ignorableWhitespace( const OUString& aWhitespaces ) + void SAL_CALL SettingsDocumentHandler::ignorableWhitespace( const OUString& ) { // ignore them - that's why they're called "ignorable" - (void)aWhitespaces; } - void SAL_CALL SettingsDocumentHandler::processingInstruction( const OUString& i_Target, const OUString& i_Data ) + void SAL_CALL SettingsDocumentHandler::processingInstruction( const OUString&, const OUString& ) { OSL_FAIL( "SettingsDocumentHandler::processingInstruction: unexpected ..." ); - (void)i_Target; - (void)i_Data; } - void SAL_CALL SettingsDocumentHandler::setDocumentLocator( const Reference< XLocator >& i_Locator ) - { - (void)i_Locator; - } + void SAL_CALL SettingsDocumentHandler::setDocumentLocator( const Reference< XLocator >& ) {} // SubComponentRecovery const OUString SubComponentRecovery::getComponentsStorageName( const SubComponentType i_eType ) @@ -543,8 +536,7 @@ namespace dbaccess if ( xDocDefinition.is() ) { Reference< XController > xController( m_xDocumentUI, UNO_QUERY_THROW ); - Reference< XInterface > xLoader( *new SubComponentLoader( xController, xDocDefinition ) ); - (void)xLoader; + Reference< XInterface >( *new SubComponentLoader( xController, xDocDefinition ) ); } return xSubComponent; @@ -597,8 +589,7 @@ namespace dbaccess } Reference< XController > xController( m_xDocumentUI, UNO_QUERY_THROW ); - Reference< XInterface > xLoader( *new SubComponentLoader( xController, xSubComponent ) ); - (void)xLoader; + Reference< XInterface >( *new SubComponentLoader( xController, xSubComponent ) ); return xSubComponent; } diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx index b37a9f990124..6c82391b8197 100644 --- a/dbaccess/source/ext/macromigration/migrationlog.cxx +++ b/dbaccess/source/ext/macromigration/migrationlog.cxx @@ -151,8 +151,6 @@ namespace dbmm OSL_ENSURE( m_pData->aDocumentLogs.find( _nDocID ) != m_pData->aDocumentLogs.end(), "MigrationLog::finishedDocument: document is not known!" ); - DocumentEntry& rDocEntry = m_pData->aDocumentLogs[ _nDocID ]; - (void)rDocEntry; // nothing to do here } diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 209c92dcd8f0..2c641e67abab 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1365,7 +1365,6 @@ sal_Bool SbaXDataBrowserController::approveReset(const css::lang::EventObject& / void SbaXDataBrowserController::resetted(const css::lang::EventObject& rEvent) { OSL_ENSURE(rEvent.Source == getControlModel(), "SbaXDataBrowserController::resetted : where did this come from ?"); - (void)rEvent; setCurrentModified( false ); } diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index f3e9b004ef11..ad7439446c1f 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -1283,9 +1283,8 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) if (::comphelper::getBOOL(xField->getPropertyValue(PROPERTY_ISREADONLY))) break; } - catch (const Exception& e ) + catch (const Exception& ) { - (void)e; // make compiler happy // assume RO break; } diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index fa21ecb34fb3..1b475b7920e5 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -91,10 +91,7 @@ namespace dbaui } while ( false ); } - catch ( Exception& rException ) - { - (void)rException; - } + catch ( Exception& ) {} return aIcon; } @@ -185,10 +182,7 @@ namespace dbaui m_aURLs.insert( MapIndexToStringPair::value_type( nPos, StringPair( sDecodedURL, sFilter ) ) ); } } - catch( Exception& rException ) - { - (void)rException; - } + catch( Exception& ) {} } } diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx index fe2e86a95967..9e5b19611f16 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx +++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx @@ -168,10 +168,7 @@ namespace dbaui { SetText(_sTitle); } - void OUserAdminDlg::enableConfirmSettings( bool _bEnable ) - { - (void)_bEnable; - } + void OUserAdminDlg::enableConfirmSettings( bool ) {} void OUserAdminDlg::saveDatasource() { PrepareLeaveCurrentPage(); diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 3b59fcb383c6..4e741c7b8d42 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -531,10 +531,7 @@ namespace dbaui SetText(_sTitle); } - void AdvancedSettingsDialog::enableConfirmSettings( bool _bEnable ) - { - (void)_bEnable; - } + void AdvancedSettingsDialog::enableConfirmSettings( bool ) {} void AdvancedSettingsDialog::saveDatasource() { diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 5163372df0ac..209bb50a5c72 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -223,10 +223,7 @@ void ODbAdminDialog::setTitle(const OUString& _sTitle) SetText(_sTitle); } -void ODbAdminDialog::enableConfirmSettings( bool _bEnable ) -{ - (void)_bEnable; -} +void ODbAdminDialog::enableConfirmSettings( bool ) {} void ODbAdminDialog::saveDatasource() { diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 76c7160d5ac5..9754342c4bff 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -146,7 +146,6 @@ OTableIndex ODbaseIndexDialog::implRemoveIndex(const OUString& _rName, TableInde } } - (void)_bMustExist; OSL_ENSURE(!_bMustExist || (aSearch != _rList.end()), "ODbaseIndexDialog::implRemoveIndex : did not find the index!"); return aReturn; } @@ -474,9 +473,8 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const ::ucbhelper::Content aContent(aURL.GetURLNoPass(),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); aContent.executeCommand( "delete", makeAny( true ) ); } - catch (const Exception& e ) + catch (const Exception& ) { - (void)e; // make compiler happy // simply silent this. The strange algorithm here does a lot of // things even if no files at all were created or accessed, so it's // possible that the file we're trying to delete does not even diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 1ced37e208db..72d9cc276b55 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -103,7 +103,6 @@ namespace dbaui OSL_ENSURE(Reference< XConnection >(_rSource.Source, UNO_QUERY).get() == m_xConnection.get(), "DirectSQLDialog::_disposing: where does this come from?"); - (void)_rSource; { OUString sMessage(ModuleRes(STR_DIRECTSQL_CONNECTIONLOST)); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 5e3861764afe..2149c6eb234d 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -306,9 +306,6 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, // search the best matching type #ifdef DBG_UTIL OUString sDBTypeName = aIter->second->aTypeName; (void)sDBTypeName; - sal_Int32 nDBTypePrecision = aIter->second->nPrecision; (void)nDBTypePrecision; - sal_Int32 nDBTypeScale = aIter->second->nMaximumScale; (void)nDBTypeScale; - bool bDBAutoIncrement = aIter->second->bAutoIncrement; (void)bDBAutoIncrement; #endif if ( ( _sTypeName.isEmpty() diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index cc3980d3e9a5..31c58ed4a6c7 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -92,7 +92,6 @@ void OWizTypeSelectControl::DeactivateAggregate( EControlType eType ) void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId ) { OSL_ENSURE(nRow == -1,"nRow must be -1!"); - (void)nRow; MultiListBox *pListBox = static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_pColumnNames; diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx index 8981d060631f..aaa961254fd1 100644 --- a/dbaccess/source/ui/misc/dbaundomanager.cxx +++ b/dbaccess/source/ui/misc/dbaundomanager.cxx @@ -312,9 +312,8 @@ namespace dbaui return *&m_xImpl->rParent; } - void SAL_CALL UndoManager::setParent( const Reference< XInterface >& i_parent ) + void SAL_CALL UndoManager::setParent( const Reference< XInterface >& ) { - (void)i_parent; throw NoSupportException( OUString(), m_xImpl->getThis() ); } diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index bc8c16928413..25e61b4bfbd8 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2731,13 +2731,6 @@ bool OQueryDesignView::PreNotify(NotifyEvent& rNEvt) { if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) { -#if OSL_DEBUG_LEVEL > 0 - { - vcl::Window* pFocus = Application::GetFocusWindow(); - (void)pFocus; - } -#endif - if ( m_pSelectionBox && m_pSelectionBox->HasChildPathFocus() ) m_eChildFocus = SELECTION; else |