diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-03-25 08:09:03 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-03-25 08:02:31 +0000 |
commit | 5ca7d56aca5d7cae3f6eefad181839f9b3a2ece6 (patch) | |
tree | 48aa26a37bb233daa2c7311c45f804ac158fdf6b /src/3rdparty/sqlite/sqlite3.c | |
parent | e19fda916aa92f8890199dc4b9d56884c55d0cd8 (diff) |
QVarLengthArray: fix compilation with GCC 7
This fixes a warning-turned-Werror in qdistancefield.cpp:
In member function ‘void QVarLengthArray<T, Prealloc>::realloc(int, int) [with T = bool; int Prealloc = 256]’,
inlined from ‘void makeDistanceField(QDistanceFieldData*, const QPainterPath&, int, int)’ at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qvarlengtharray.h:275:10:
../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qvarlengtharray.h:390:19: error: ‘void* memcpy(void*, const void*, size_t)’: specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
memcpy(ptr, oldPtr, copySize * sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Apparently GCC cannot rule out that copySize may be negative in the
call to memcpy. Put GCC on the right track by adding a Q_ASSUME.
Change-Id: I63e3801e52ebe2a7f77e3a97ef03ec3869319c8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/3rdparty/sqlite/sqlite3.c')
0 files changed, 0 insertions, 0 deletions