[Libreoffice-commits] core.git: connectivity/source
Stephan Bergmann
sbergman at redhat.com
Tue Sep 8 06:17:46 PDT 2015
connectivity/source/drivers/odbc/OTools.cxx | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 4e95a613dc5cc836d0c9582fd647d676107d1786
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Sep 8 15:14:10 2015 +0200
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
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx
index f08b767..8777b3d 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
);
}
More information about the Libreoffice-commits
mailing list