summaryrefslogtreecommitdiff
path: root/mysqlc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 16:05:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-25 17:19:48 +0200
commit93d42c1b23721120fd2b61ee0b8842a14fd9b6b8 (patch)
tree5a2c4108ad65f7171a6c9bbf87199c874693a703 /mysqlc
parenta006f60b6ae22db6acb57d06167a3c6fd8bc6f1b (diff)
loplugin:oncevar in l10ntools..mysqlc
Change-Id: Ifd4826f8ba4e10f2e012172fa693794d68bb6b4d Reviewed-on: https://gerrit.libreoffice.org/39188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'mysqlc')
-rw-r--r--mysqlc/source/mysqlc_databasemetadata.cxx3
-rw-r--r--mysqlc/source/mysqlc_preparedstatement.cxx3
-rw-r--r--mysqlc/source/mysqlc_resultset.cxx3
-rw-r--r--mysqlc/source/mysqlc_statement.cxx3
4 files changed, 4 insertions, 8 deletions
diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx
index 17b845b2b03b..366b74a8e0d7 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -659,8 +659,7 @@ rtl::OUString SAL_CALL ODatabaseMetaData::getUserName()
rtl::OUString SAL_CALL ODatabaseMetaData::getDriverName()
{
- rtl::OUString aValue( "MySQL Connector/OO.org" );
- return aValue;
+ return rtl::OUString( "MySQL Connector/OO.org" );
}
rtl::OUString SAL_CALL ODatabaseMetaData::getDriverVersion()
diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx b/mysqlc/source/mysqlc_preparedstatement.cxx
index 55223e4c4bea..84d353ef5873 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -728,8 +728,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons
void OPreparedStatement::checkParameterIndex(sal_Int32 column)
{
if (column < 1 || column > (sal_Int32) m_paramCount) {
- rtl::OUString buf( "Parameter index out of range" );
- throw SQLException(buf, *this, rtl::OUString(), 1, Any ());
+ throw SQLException("Parameter index out of range", *this, rtl::OUString(), 1, Any ());
}
}
diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx
index ef112b931b8b..d0c3a8303887 100644
--- a/mysqlc/source/mysqlc_resultset.cxx
+++ b/mysqlc/source/mysqlc_resultset.cxx
@@ -1045,8 +1045,7 @@ void OResultSet::checkColumnIndex(sal_Int32 index)
{
if ((index < 1 || index > (int) fieldCount)) {
/* static object for efficiency or thread safety is a problem ? */
- rtl::OUString buf( "index out of range" );
- throw SQLException(buf, *this, rtl::OUString(), 1, Any());
+ throw SQLException("index out of range", *this, rtl::OUString(), 1, Any());
}
}
diff --git a/mysqlc/source/mysqlc_statement.cxx b/mysqlc/source/mysqlc_statement.cxx
index e881dda8ddd4..94e340cb07c9 100644
--- a/mysqlc/source/mysqlc_statement.cxx
+++ b/mysqlc/source/mysqlc_statement.cxx
@@ -291,9 +291,8 @@ sal_Bool OCommonStatement::convertFastPropertyValue(
Any & /* rConvertedValue */, Any & /* rOldValue */,
sal_Int32 /* nHandle */, const Any& /* rValue */)
{
- bool bConverted = false;
// here we have to try to convert
- return bConverted;
+ return false;
}
void OCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& /* rValue */)