From 3ab2e7ba46eac104738ab074a7df42e1bddd4d37 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 24 Aug 2019 23:18:37 +0200 Subject: Fix build on big-endian platforms with clang Reportedly, this builds OK with gcc, but not with clang (rightfully). /tmp/usr/ports/editors/libreoffice/work/libreoffice-6.3.0.4/connectivity/source/drivers/odbc/OTools.cxx:148:21: error: arithmetic on a pointer to void _pValue += _nSize - properSize; ~~~~~~~ ^ 1 error generated. The pointer arithmetics on void* was introduced in 2012 in commit 63b6b1d6120d82c4baf5cb679d75dcc5427dbbc3. Change-Id: I78beddeda8bc516e45dd2a99dba8c7b8b1cf9255 Reviewed-on: https://gerrit.libreoffice.org/78076 Reviewed-by: Mike Kaganski Tested-by: Mike Kaganski --- connectivity/source/drivers/odbc/OTools.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx index a4c3200c5b53..a5395aaf7ff3 100644 --- a/connectivity/source/drivers/odbc/OTools.cxx +++ b/connectivity/source/drivers/odbc/OTools.cxx @@ -145,7 +145,7 @@ void OTools::getValue( OConnection const * _pConnection, memset(_pValue, 0, _nSize); #ifdef OSL_BIGENDIAN // This is skewed in favour of integer types - _pValue += _nSize - properSize; + _pValue = static_cast(_pValue) + _nSize - properSize; #endif } } -- cgit