qt5base-lts/src
Marc Mutz 5ca7d56aca 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>
2017-03-25 08:02:31 +00:00
..
3rdparty Add gradle wrapper to Qt & update default Andriod gradle plugin 2017-03-23 13:04:51 +00:00
android Add gradle wrapper to Qt & update default Andriod gradle plugin 2017-03-23 13:04:51 +00:00
angle Fix unneeded recompiles of glslang_tab.cpp 2017-01-16 15:20:27 +00:00
concurrent Adapt to the C++ SIC introduced by P0012: noexcept overloading 2017-02-17 13:57:30 +00:00
corelib QVarLengthArray: fix compilation with GCC 7 2017-03-25 08:02:31 +00:00
dbus Use QT_CONFIG(library) instead of QT_NO_LIBRARY 2017-03-06 11:27:20 +00:00
gui don't try to use system zlib if it's not enabled 2017-03-22 14:11:18 +00:00
network QSslSocket: fix connection to a international domain name 2017-03-23 16:11:15 +00:00
opengl Use QT_CONFIG(library) instead of QT_NO_LIBRARY 2017-03-06 11:27:20 +00:00
openglextensions Also release winmain, qopenglextensions under commercial licenses 2016-11-18 16:19:56 +00:00
platformheaders Doc: corrected qdoc syntax parameter description 2017-01-09 15:30:17 +00:00
platformsupport Enable QStyleHints::useHoverEffects for KDE and other unix systems 2017-03-07 15:22:17 +00:00
plugins Fix hang on sleep/wakeup 2017-03-23 08:06:30 +00:00
printsupport Android: Enable the usage of QPrinter 2017-03-09 11:04:03 +00:00
sql don't try to use system zlib if it's not enabled 2017-03-22 14:11:18 +00:00
testlib Fix some warnings found by QNX's compiler 2017-03-25 04:51:01 +00:00
tools qlalr: Use forward slashes in #include directives 2017-03-10 08:47:19 +00:00
widgets Fix propagation of locale from widget to its children 2017-03-24 13:57:22 +00:00
winmain QtCore & winmain: Remove dead code 2017-01-31 19:09:31 +00:00
xml QXmlAttributes: mark as shared-come-qt6 2016-10-04 06:25:54 +00:00
src.pro Add gradle wrapper to Qt & update default Andriod gradle plugin 2017-03-23 13:04:51 +00:00