summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-02-28 10:50:35 -0800
committerThiago Macieira <thiago.macieira@intel.com>2023-03-02 01:45:09 -0800
commit8dbceaa398d92c9c7492ffeb483f2bd6fab30c17 (patch)
tree44e2519dc132bf598f461b287b3a092a4336626e /examples
parent52c7f699ac3124889b9c01fbc1fd542e30da6753 (diff)
QRegion: upgrade Q_ASSUME to Q_ASSERT
This is to fix the warning qregion.cpp:3582:12: error: ‘ET.EdgeTable::ymax’ may be used uninitialized [-Werror=maybe-uninitialized] Because the previous code in PolygonRegion() was: Q_ASSUME(Count > 1); But Q_ASSUME is becoming a no-op with GCC 12, so when this disappears, compiler rightly considered Count < 2 as a valid input. Therefore, when CreateETandAET() was called and had if (count < 2) return; The compiler again rightly concluded that it was a valid condition (after all, you're checking it!), leading to ET.ymax being used uninitialized. Since that Q_ASSUME really meant the condition of Count < 2 was not permitted, we may as well upgrade to Q_ASSERT in both places. Change-Id: I7f354474adce419ca6c2fffd1748119ef0092fa4 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions