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>