summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-20 09:26:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-20 11:54:20 +0200
commit8ed77fae3e5e9e5f7409e03d5e4586f428a65c86 (patch)
treee4dea7abf2deced1aeb88eb8b570a75271cb9150 /connectivity
parent4d7054947d87174decf12ad204c09532f33599f8 (diff)
loplugin:oncevar in codemaker..connectivity
Change-Id: Ia479d9d3d459a699dfc5c1148d01c35e8bc973bd Reviewed-on: https://gerrit.libreoffice.org/39000 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/FValue.cxx3
-rw-r--r--connectivity/source/commontools/TIndexColumns.cxx3
-rw-r--r--connectivity/source/commontools/TIndexes.cxx3
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx3
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx3
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx3
-rw-r--r--connectivity/source/drivers/firebird/DatabaseMetaData.cxx21
-rw-r--r--connectivity/source/drivers/firebird/StatementCommonBase.cxx3
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx3
-rw-r--r--connectivity/source/drivers/jdbc/CallableStatement.cxx10
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx10
-rw-r--r--connectivity/source/drivers/mork/MDatabaseMetaData.cxx51
-rw-r--r--connectivity/source/drivers/mork/MStatement.cxx3
-rw-r--r--connectivity/source/drivers/mysql/YCatalog.cxx4
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx2
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_xuser.cxx3
18 files changed, 48 insertions, 86 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 721ca95d9a8c..55b639eab9d6 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -2208,7 +2208,6 @@ void ORowSetValue::fill(sal_Int32 _nPos,
void ORowSetValue::impl_fill( const sal_Int32 _nType, bool _bNullable, const detail::IValueSource& _rValueSource )
{
- bool bReadData = true;
switch(_nType)
{
case DataType::CHAR:
@@ -2288,7 +2287,7 @@ void ORowSetValue::impl_fill( const sal_Int32 _nType, bool _bNullable, const det
(*this) = _rValueSource.getObject();
break;
}
- if ( bReadData && _bNullable && _rValueSource.wasNull() )
+ if ( _bNullable && _rValueSource.wasNull() )
setNull();
setTypeKind(_nType);
}
diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx
index fcddb7f4caec..2d83fa7b2908 100644
--- a/connectivity/source/commontools/TIndexColumns.cxx
+++ b/connectivity/source/commontools/TIndexColumns.cxx
@@ -60,11 +60,10 @@ sdbcx::ObjectType OIndexColumns::createObject(const OUString& _rName)
if ( xResult.is() )
{
Reference< XRow > xRow(xResult,UNO_QUERY);
- OUString aD("D");
while( xResult->next() )
{
if(xRow->getString(9) == _rName)
- bAsc = xRow->getString(10) != aD;
+ bAsc = xRow->getString(10) != "D";
}
}
diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx
index 0c950b919e24..050364e81462 100644
--- a/connectivity/source/commontools/TIndexes.cxx
+++ b/connectivity/source/commontools/TIndexes.cxx
@@ -138,7 +138,6 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const
::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
OUStringBuffer aSql( "CREATE " );
OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( );
- OUString aDot( "." );
if(comphelper::getBOOL(descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISUNIQUE))))
aSql.append("UNIQUE ");
@@ -192,7 +191,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const
xColumns->getByIndex(0) >>= xColProp;
- aSql.append(aDot);
+ aSql.append(".");
aSql.append(::dbtools::quoteName( aQuote,comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)))));
}
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index 0f030b5fbbc0..f1d7d7f17b7c 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -776,8 +776,7 @@ bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols,
{
// read the bookmark
- bool bIsCurRecordDeleted = false;
- _rRow->setDeleted(bIsCurRecordDeleted);
+ _rRow->setDeleted(false);
*(_rRow->get())[0] = m_nFilePos;
if (!bRetrieveData)
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index a684616771c6..97bed39062b8 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2372,8 +2372,7 @@ void SAL_CALL ODbaseTable::renameImpl( const OUString& newName )
renameFile(m_pConnection,m_Name,newName,m_pConnection->getExtension());
if ( HasMemoFields() )
{ // delete the memo fields
- OUString sExt("dbt");
- renameFile(m_pConnection,m_Name,newName,sExt);
+ renameFile(m_pConnection,m_Name,newName,"dbt");
}
}
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 2d03917cc3e7..a17222f52f31 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -246,8 +246,7 @@ void Connection::construct(const ::rtl::OUString& url, const Sequence< PropertyV
// set UTF8 as default character set
const char sCharset[] = "UTF8";
dpbBuffer.push_back(isc_dpb_set_db_charset);
- int nCharsetLength = sizeof(sCharset) - 1;
- dpbBuffer.push_back(nCharsetLength);
+ dpbBuffer.push_back(sizeof(sCharset) - 1);
dpbBuffer.append(sCharset);
// Do any more dpbBuffer additions here
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index d456f5efcdaa..6bfa79c9794d 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -206,8 +206,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength()
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTablesInSelect( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
@@ -341,8 +340,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames()
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( )
@@ -444,14 +442,12 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( )
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatements( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( )
{
- sal_Int32 nValue = 31; // TODO: confirm
- return nValue;
+ return 31; // TODO: confirm
}
sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( )
@@ -682,20 +678,17 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( )
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( )
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
index 1cf44a849636..cc0e417f19db 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
@@ -302,9 +302,8 @@ sal_Bool OStatementCommonBase::convertFastPropertyValue(
(void) rOldValue;
(void) nHandle;
(void) rValue;
- bool bConverted = false;
// here we have to try to convert
- return bConverted;
+ return false;
}
void OStatementCommonBase::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 4d35689f2f31..a60f32766e26 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -128,9 +128,8 @@ namespace connectivity
{
if ( !m_xDriver.is() )
{
- OUString sURL("jdbc:hsqldb:db");
Reference<XDriverManager2> xDriverAccess = DriverManager::create( m_xContext );
- m_xDriver = xDriverAccess->getDriverByURL(sURL);
+ m_xDriver = xDriverAccess->getDriverByURL("jdbc:hsqldb:db");
}
return m_xDriver;
diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx
index 713a22e3dd49..8d431b77c851 100644
--- a/connectivity/source/drivers/jdbc/CallableStatement.cxx
+++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx
@@ -88,7 +88,7 @@ sal_Int8 SAL_CALL java_sql_CallableStatement::getByte( sal_Int32 columnIndex )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java environment has been deleted!");
createStatement(t.pEnv);
static jmethodID mID(nullptr);
- jbyte (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod;
+ jbyte (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod;
return callMethodWithIntArg<jbyte>(pCallMethod,"getByte","(I)B",mID,columnIndex);
}
Sequence< sal_Int8 > SAL_CALL java_sql_CallableStatement::getBytes( sal_Int32 columnIndex )
@@ -123,7 +123,7 @@ double SAL_CALL java_sql_CallableStatement::getDouble( sal_Int32 columnIndex )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java environment has been deleted!");
createStatement(t.pEnv);
static jmethodID mID(nullptr);
- double (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod;
+ double (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod;
return callMethodWithIntArg<double>(pCallMethod,"getDouble","(I)D",mID,columnIndex);
}
@@ -132,7 +132,7 @@ float SAL_CALL java_sql_CallableStatement::getFloat( sal_Int32 columnIndex )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java environment has been deleted!");
createStatement(t.pEnv);
static jmethodID mID(nullptr);
- jfloat (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod;
+ jfloat (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod;
return callMethodWithIntArg<jfloat>(pCallMethod,"getFloat","(I)F",mID,columnIndex);
}
@@ -149,7 +149,7 @@ sal_Int64 SAL_CALL java_sql_CallableStatement::getLong( sal_Int32 columnIndex )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java environment has been deleted!");
createStatement(t.pEnv);
static jmethodID mID(nullptr);
- jlong (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod;
+ jlong (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod;
return callMethodWithIntArg<jlong>(pCallMethod,"getLong","(I)J",mID,columnIndex);
}
@@ -168,7 +168,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java environment has been deleted!");
createStatement(t.pEnv);
static jmethodID mID(nullptr);
- jshort (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod;
+ jshort (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod;
return callMethodWithIntArg<jshort>(pCallMethod,"getShort","(I)S",mID,columnIndex);
}
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 29ad290bb25f..9f64d1bd6680 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -165,7 +165,7 @@ sal_Bool SAL_CALL java_sql_ResultSet::getBoolean( sal_Int32 columnIndex )
sal_Int8 SAL_CALL java_sql_ResultSet::getByte( sal_Int32 columnIndex )
{
static jmethodID mID(nullptr);
- jbyte (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod;
+ jbyte (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod;
return callMethodWithIntArg<jbyte>(pCallMethod,"getByte","(I)B",mID,columnIndex);
}
@@ -200,7 +200,7 @@ css::util::Date SAL_CALL java_sql_ResultSet::getDate( sal_Int32 columnIndex )
double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex )
{
static jmethodID mID(nullptr);
- jdouble (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod;
+ jdouble (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod;
return callMethodWithIntArg<double>(pCallMethod,"getDouble","(I)D",mID,columnIndex);
}
@@ -208,7 +208,7 @@ double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex )
float SAL_CALL java_sql_ResultSet::getFloat( sal_Int32 columnIndex )
{
static jmethodID mID(nullptr);
- jfloat (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod;
+ jfloat (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod;
return callMethodWithIntArg<jfloat>(pCallMethod,"getFloat","(I)F",mID,columnIndex);
}
@@ -230,7 +230,7 @@ sal_Int32 SAL_CALL java_sql_ResultSet::getRow( )
sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex )
{
static jmethodID mID(nullptr);
- jlong (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod;
+ jlong (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod;
return callMethodWithIntArg<jlong>(pCallMethod,"getLong","(I)J",mID,columnIndex);
}
@@ -349,7 +349,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex )
{
static jmethodID mID(nullptr);
- jshort (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod;
+ jshort (JNIEnv::* const pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod;
return callMethodWithIntArg<jshort>(pCallMethod,"getShort","(I)S",mID,columnIndex);
}
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
index 3b5197df500e..f282d8575992 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
@@ -145,56 +145,47 @@ OUString ODatabaseMetaData::impl_getCatalogSeparator_throw( )
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( )
{
- sal_Int32 nValue = 65535; // 0 means no limit
- return nValue;
+ return 65535; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( )
{
- sal_Int32 nValue = 254; // 0 means no limit
- return nValue;
+ return 254; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( )
{
- sal_Int32 nValue = 20; // 0 means no limit
- return nValue;
+ return 20; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( )
@@ -204,8 +195,7 @@ sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( )
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( )
@@ -262,8 +252,7 @@ bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( )
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( )
@@ -412,14 +401,12 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength( )
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( )
@@ -746,26 +733,22 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( )
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( )
{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
+ return 0; // 0 means no limit
}
sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 /*setType*/ )
diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx
index 864dc83c7b1d..13cb0d280073 100644
--- a/connectivity/source/drivers/mork/MStatement.cxx
+++ b/connectivity/source/drivers/mork/MStatement.cxx
@@ -325,9 +325,8 @@ sal_Bool OCommonStatement::convertFastPropertyValue(
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*/)
diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx
index eb755309fd41..47eb3dd38232 100644
--- a/connectivity/source/drivers/mysql/YCatalog.cxx
+++ b/connectivity/source/drivers/mysql/YCatalog.cxx
@@ -74,11 +74,9 @@ void OMySQLCatalog::refreshViews()
// let's simply assume the server is new enough to support views. Current drivers
// as of this writing might not return the proper information in getTableTypes, so
// don't rely on it.
- bool bSupportsViews = true;
TStringVector aVector;
- if ( bSupportsViews )
- refreshObjects(aTypes,aVector);
+ refreshObjects(aTypes,aVector);
if ( m_pViews )
m_pViews->reFill(aVector);
diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx
index a05bb0028873..26ac43ca60f6 100644
--- a/connectivity/source/drivers/mysql/YTables.cxx
+++ b/connectivity/source/drivers/mysql/YTables.cxx
@@ -67,7 +67,7 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
Reference< XRow > xRow(xResult,UNO_QUERY);
if ( xResult->next() ) // there can be only one table with this name
{
- sal_Int32 nPrivileges = Privilege::DROP |
+ sal_Int32 const nPrivileges = Privilege::DROP |
Privilege::REFERENCE |
Privilege::ALTER |
Privilege::CREATE |
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index f0345d5eefd7..44da0bb72aac 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -695,8 +695,7 @@ Any SAL_CALL ODatabaseMetaDataResultSet::getWarnings( )
sal_Int32 ODatabaseMetaDataResultSet::getFetchSize()
{
- sal_Int32 nValue=1;
- return nValue;
+ return 1;
}
OUString ODatabaseMetaDataResultSet::getCursorName()
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index b6e021116326..02e2e58a59e3 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -1153,8 +1153,7 @@ bool implSetObject( const Reference< XParameters >& _rxParameters,
{
case css::uno::TypeClass_HYPER:
{
- sal_Int64 nValue = 0;
- _rxParameters->setLong( _nColumnIndex, nValue );
+ _rxParameters->setLong( _nColumnIndex, sal_Int64(0) );
}
break;
diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx
index f3fd5385df82..b41af2736076 100644
--- a/connectivity/source/drivers/postgresql/pq_xuser.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx
@@ -135,7 +135,6 @@ void User::changePassword(
sal_Int32 User::getPrivileges( const OUString& objName, sal_Int32 objType )
{
- sal_Int32 ret = 0xffffffff;
if (isLog(m_pSettings, LogLevel::Info))
{
Statics & st = getStatics();
@@ -147,7 +146,7 @@ sal_Int32 User::getPrivileges( const OUString& objName, sal_Int32 objType )
log(m_pSettings, LogLevel::Info, buf.makeStringAndClear());
}
// all privileges
- return ret;
+ return 0xffffffff;
}
sal_Int32 User::getGrantablePrivileges( const OUString& objName, sal_Int32 objType )