summaryrefslogtreecommitdiffstats
path: root/connectivity/source/drivers/mysqlc
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/mysqlc')
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_connection.cxx2
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx17
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx6
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx16
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_statement.cxx3
5 files changed, 12 insertions, 32 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
index 74613a733a3a..2ad5b5f56962 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
@@ -419,7 +419,7 @@ void SAL_CALL OConnection::close()
// XWarningsSupplier
Any SAL_CALL OConnection::getWarnings()
{
- Any x = Any();
+ Any x;
// when you collected some warnings -> return it
return x;
}
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index 3b9e4a2aeb57..ae573a6d8fbc 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
@@ -254,8 +254,7 @@ template <> OUString OPreparedResultSet::retrieveValue(sal_Int32 column)
return getRowSetValue(column);
const char* sStr = static_cast<const char*>(m_aData[column - 1].buffer);
- OUString sReturn = OUString(sStr, *m_aData[column - 1].length, m_encoding);
- return sReturn;
+ return OUString(sStr, *m_aData[column - 1].length, m_encoding);
}
ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 nColumnIndex)
@@ -414,7 +413,7 @@ Any SAL_CALL OPreparedResultSet::getObject(sal_Int32 column,
checkDisposed(OPreparedResultSet_BASE::rBHelper.bDisposed);
checkColumnIndex(column);
- Any aRet = Any();
+ Any aRet;
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedResultSet::getObject", *this);
return aRet;
@@ -696,11 +695,7 @@ void SAL_CALL OPreparedResultSet::cancel()
void SAL_CALL OPreparedResultSet::clearWarnings() {}
-Any SAL_CALL OPreparedResultSet::getWarnings()
-{
- Any aRet = Any();
- return aRet;
-}
+Any SAL_CALL OPreparedResultSet::getWarnings() { return Any(); }
void SAL_CALL OPreparedResultSet::insertRow()
{
@@ -921,13 +916,12 @@ Any SAL_CALL OPreparedResultSet::getBookmark()
{
MutexGuard aGuard(m_aMutex);
checkDisposed(OPreparedResultSet_BASE::rBHelper.bDisposed);
- Any aRet = Any();
// if you don't want to support bookmark you must remove the XRowLocate interface
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedResultSet::getBookmark",
*this);
- return aRet;
+ return Any();
}
sal_Bool SAL_CALL OPreparedResultSet::moveToBookmark(const Any& /* bookmark */)
@@ -975,11 +969,10 @@ uno::Sequence<sal_Int32>
{
MutexGuard aGuard(m_aMutex);
checkDisposed(OPreparedResultSet_BASE::rBHelper.bDisposed);
- uno::Sequence<sal_Int32> aRet = uno::Sequence<sal_Int32>();
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedResultSet::deleteRows",
*this);
- return aRet;
+ return uno::Sequence<sal_Int32>();
}
IPropertyArrayHelper* OPreparedResultSet::createArrayHelper() const
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
index e8c2fcda8a69..910825742cef 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
@@ -546,11 +546,7 @@ void SAL_CALL OPreparedStatement::addBatch()
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedStatement::addBatch", *this);
}
-Sequence<sal_Int32> SAL_CALL OPreparedStatement::executeBatch()
-{
- Sequence<sal_Int32> aRet = Sequence<sal_Int32>();
- return aRet;
-}
+Sequence<sal_Int32> SAL_CALL OPreparedStatement::executeBatch() { return Sequence<sal_Int32>(); }
void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue)
{
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
index 05d5c1321604..0175dcd9cab9 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
@@ -435,10 +435,8 @@ Any SAL_CALL OResultSet::getObject(sal_Int32 column,
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
checkBordersAndEnsureFetched(column);
- Any aRet = Any();
-
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getObject", *this);
- return aRet;
+ return Any();
}
sal_Int16 SAL_CALL OResultSet::getShort(sal_Int32 column)
@@ -734,11 +732,7 @@ void SAL_CALL OResultSet::cancel()
void SAL_CALL OResultSet::clearWarnings() {}
-Any SAL_CALL OResultSet::getWarnings()
-{
- Any aRet = Any();
- return aRet;
-}
+Any SAL_CALL OResultSet::getWarnings() { return Any(); }
void SAL_CALL OResultSet::insertRow()
{
@@ -959,12 +953,11 @@ Any SAL_CALL OResultSet::getBookmark()
{
MutexGuard aGuard(m_aMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- Any aRet = Any();
// if you don't want to support bookmark you must remove the XRowLocate interface
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBookmark", *this);
- return aRet;
+ return Any();
}
sal_Bool SAL_CALL OResultSet::moveToBookmark(const Any& /* bookmark */)
@@ -1009,10 +1002,9 @@ uno::Sequence<sal_Int32> SAL_CALL OResultSet::deleteRows(const uno::Sequence<Any
{
MutexGuard aGuard(m_aMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- uno::Sequence<sal_Int32> aRet = uno::Sequence<sal_Int32>();
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::deleteRows", *this);
- return aRet;
+ return uno::Sequence<sal_Int32>();
}
IPropertyArrayHelper* OResultSet::createArrayHelper() const
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
index ef33d1431f72..a789dc4996b6 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
@@ -204,8 +204,7 @@ Sequence<sal_Int32> SAL_CALL OStatement::executeBatch()
MutexGuard aGuard(m_aMutex);
checkDisposed(rBHelper.bDisposed);
- Sequence<sal_Int32> aRet = Sequence<sal_Int32>();
- return aRet;
+ return Sequence<sal_Int32>();
}
sal_Int32 SAL_CALL OCommonStatement::executeUpdate(const OUString& sql)