connectivity/source/drivers/ado/APreparedStatement.cxx | 7 ++----- connectivity/source/drivers/ado/AStatement.cxx | 8 ++------ 2 files changed, 4 insertions(+), 11 deletions(-)
New commits: commit 3e2eee260b45dc69d03ce0c0d4eb6add09824bda Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Jun 25 13:52:19 2021 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Jun 25 22:39:08 2021 +0200 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 <sberg...@redhat.com> 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(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits