diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-24 23:18:37 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-25 01:38:19 +0200 |
commit | 3ab2e7ba46eac104738ab074a7df42e1bddd4d37 (patch) | |
tree | 0b8830a6790cbf6f48d58cdf3c2eee051d75a883 /connectivity | |
parent | 57c9a995bafcaeb9ab00facb9b7f3ed52c7e7d2a (diff) |
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 <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/odbc/OTools.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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<char*>(_pValue) + _nSize - properSize; #endif } } |