summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-09-08 15:14:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-09-08 15:17:26 +0200
commit4e95a613dc5cc836d0c9582fd647d676107d1786 (patch)
treebc719baf5b43ea8137a8b9dbe0d7061b796b3b32 /connectivity
parent241a0c1ab1fbbd3038f8add3bb2b2e1683598daa (diff)
clang-analyzer-deadcode.DeadStores
...ever since b309e422c631ce6ce729552cc8053478f9539dfd "#95348# type usage changed" introduced the local nMaxLen and passed that instead of _nMaxLen into the two ODBC3SQLFunctionId::BindCol calls Change-Id: Ifb561106c87b6e424ccc9d350752b19b3648c7c8
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/odbc/OTools.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx
index f08b767ff915..8777b3de6adb 100644
--- a/connectivity/source/drivers/odbc/OTools.cxx
+++ b/connectivity/source/drivers/odbc/OTools.cxx
@@ -164,7 +164,6 @@ void OTools::bindValue( OConnection* _pConnection,
SQLRETURN nRetcode;
SQLSMALLINT fSqlType;
SQLSMALLINT fCType;
- SQLLEN nMaxLen = _nMaxLen;
OTools::getBindTypes( false,
_bUseOldTimeDate,
@@ -179,7 +178,7 @@ void OTools::bindValue( OConnection* _pConnection,
(SQLUSMALLINT)columnIndex,
fCType,
_pData,
- nMaxLen,
+ _nMaxLen,
pLen
);
}
@@ -195,7 +194,6 @@ void OTools::bindValue( OConnection* _pConnection,
OString aString(OUStringToOString(*static_cast<OUString const *>(_pValue),_nTextEncoding));
*pLen = SQL_NTS;
*static_cast<OString*>(_pData) = aString;
- _nMaxLen = (SQLSMALLINT)aString.getLength();
// Pointer on Char*
_pData = const_cast<char *>(aString.getStr());
@@ -208,8 +206,7 @@ void OTools::bindValue( OConnection* _pConnection,
case SQL_NUMERIC:
{
OString aString = OString::number(*static_cast<double const *>(_pValue));
- _nMaxLen = (SQLSMALLINT)aString.getLength();
- *pLen = _nMaxLen;
+ *pLen = (SQLSMALLINT)aString.getLength();
*static_cast<OString*>(_pData) = aString;
// Pointer on Char*
_pData = const_cast<char *>(static_cast<OString*>(_pData)->getStr());
@@ -280,7 +277,7 @@ void OTools::bindValue( OConnection* _pConnection,
(SQLUSMALLINT)columnIndex,
fCType,
_pData,
- nMaxLen,
+ _nMaxLen,
pLen
);
}