Fix to make g++-10.2 happy
g++-10.2 fails to compile qregion.cpp in RelWithDebInfo configuration, with error message: qregion.cpp:3617:12: error: ‘ET.EdgeTable::ymax’ may be used uninitialized in this function [-Werror=maybe-uninitialized] g++ is right here, for Count==1, 'ET' is not initialized but used. This patch fixes this by Q_ASSUMEing Count > 1. Pick-to: 5.15 Change-Id: I3b9f1f58de9f3811c60640a08334487e3f8f2b23 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
5d4c0accc1
commit
dd0647b17a
@ -3572,6 +3572,8 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
|
||||
POINTBLOCK *tmpPtBlock;
|
||||
int numFullPtBlocks = 0;
|
||||
|
||||
Q_ASSUME(Count > 1);
|
||||
|
||||
region = new QRegionPrivate;
|
||||
|
||||
/* special case a rectangle */
|
||||
|
Loading…
x
Reference in New Issue
Block a user