summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2016-02-21 08:20:33 -0800
committerMichael Stahl <mstahl@redhat.com>2016-02-22 17:22:30 +0100
commit321dc36fc9e9a2d7761bc545ed5a47420c8fce6c (patch)
treeabd8a489844a3a3d75b6785cca15945de2483f1e /connectivity/source
parentaf824f7b078e2603b96b557e9623830350fd4d15 (diff)
WaE vs2015: casting from int32 to pointer to to odbc idiosyncracies
Change-Id: I94f2435aee76b03d4b14b009fdeca06a14f22909 Reviewed-on: https://gerrit.libreoffice.org/22599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> (cherry picked from commit 1e82ae8811e7c344805bba8ee0411c9b3682a80f) Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/odbc/OTools.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx
index 06d11c63145f..4b937859e2fb 100644
--- a/connectivity/source/drivers/odbc/OTools.cxx
+++ b/connectivity/source/drivers/odbc/OTools.cxx
@@ -253,7 +253,9 @@ void OTools::bindValue( OConnection* _pConnection,
} break;
case SQL_LONGVARBINARY:
{
- _pData = reinterpret_cast<void*>(columnIndex);
+ /* see https://msdn.microsoft.com/en-us/library/ms716238%28v=vs.85%29.aspx
+ * for an explanation of that apparently weird cast */
+ _pData = reinterpret_cast<void*>((uintptr_t)columnIndex);
sal_Int32 nLen = 0;
nLen = static_cast<const ::com::sun::star::uno::Sequence< sal_Int8 > *>(_pValue)->getLength();
*pLen = (SQLLEN)SQL_LEN_DATA_AT_EXEC(nLen);
@@ -261,7 +263,9 @@ void OTools::bindValue( OConnection* _pConnection,
break;
case SQL_LONGVARCHAR:
{
- _pData = reinterpret_cast<void*>(columnIndex);
+ /* see https://msdn.microsoft.com/en-us/library/ms716238%28v=vs.85%29.aspx
+ * for an explanation of that apparently weird cast */
+ _pData = reinterpret_cast<void*>((uintptr_t)columnIndex);
sal_Int32 nLen = 0;
nLen = static_cast<OUString const *>(_pValue)->getLength();
*pLen = (SQLLEN)SQL_LEN_DATA_AT_EXEC(nLen);