[Libreoffice-commits] core.git: connectivity/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Sat Aug 24 23:39:29 UTC 2019


 connectivity/source/drivers/odbc/OTools.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3ab2e7ba46eac104738ab074a7df42e1bddd4d37
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Aug 24 23:18:37 2019 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Aug 25 01:38:19 2019 +0200

    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 at collabora.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>

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
         }
     }


More information about the Libreoffice-commits mailing list