[Libreoffice-commits] core.git: connectivity/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 25 20:39:49 UTC 2021
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 <sbergman at redhat.com>
AuthorDate: Fri Jun 25 13:52:19 2021 +0200
Commit: Stephan Bergmann <sbergman at 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 <sbergman at 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();
}
More information about the Libreoffice-commits
mailing list