diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-06-25 13:52:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-06-25 22:39:08 +0200 |
commit | 3e2eee260b45dc69d03ce0c0d4eb6add09824bda (patch) | |
tree | 8376414a7b349ebbc8626fcb753e1afd24d93e6d /connectivity/source/drivers/ado | |
parent | f54cba63809c511106f291e66019ebe57eafdfe0 (diff) |
More -Werror,-Wunused-but-set-variable when catching SQLWarning
...similar to f09cb84b274edd2a27697a7dc803a7ee42946de2
"-Werror,-Wunused-but-set-variable (Clang 13 trunk)", this time with clang-cl 13
trunk in Windows-only code
Change-Id: I6b0da5aa79de07cf7326ad6cf6649cafff3be6a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117879
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/drivers/ado')
-rw-r--r-- | connectivity/source/drivers/ado/APreparedStatement.cxx | 7 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AStatement.cxx | 8 |
2 files changed, 4 insertions, 11 deletions
diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index bffecc94afc8..0db461ef12d3 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -145,7 +145,6 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - SQLWarning warning; clearWarnings (); // Call SQLExecute @@ -154,12 +153,10 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) CHECK_RETURN(m_Command.Execute(m_RecordsAffected,m_Parameters,adCmdUnknown,&pSet)) m_RecordSet = WpADORecordset(pSet); } - catch (SQLWarning& ex) + catch (SQLWarning&) { - // Save pointer to warning and save with ResultSet + //TODO: Save pointer to warning and save with ResultSet // object once it is created. - - warning = ex; } return m_RecordSet.IsValid(); } diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx index 57f9c347ecea..9670d92292bd 100644 --- a/connectivity/source/drivers/ado/AStatement.cxx +++ b/connectivity/source/drivers/ado/AStatement.cxx @@ -441,8 +441,6 @@ sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) checkDisposed(OStatement_BASE::rBHelper.bDisposed); - SQLWarning warning; - // clear previous warnings clearWarnings (); @@ -456,13 +454,11 @@ sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) if(m_RecordSet.IsValid() && m_RecordSet.NextRecordset(aRecordsAffected,&pSet) && pSet) assignRecordSet( pSet ); } - catch (SQLWarning &ex) + catch (SQLWarning &) { - // Save pointer to warning and save with ResultSet + //TODO: Save pointer to warning and save with ResultSet // object once it is created. - - warning = ex; } return m_RecordSet.IsValid(); } |