diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2020-10-14 19:48:30 +0200 |
---|---|---|
committer | Andreas Buhr <andreas.buhr@qt.io> | 2020-10-22 01:23:46 +0200 |
commit | dd0647b17aa43bccf36285285ecccb54f18176ad (patch) | |
tree | 776d86b39247d2b4678cd82ac305498b134d4aa0 /src/gui/painting/qregion.cpp | |
parent | 5d4c0accc198a1906d638e0f3dbedd6ea503486b (diff) |
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>
Diffstat (limited to 'src/gui/painting/qregion.cpp')
-rw-r--r-- | src/gui/painting/qregion.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp index 7acfceee8d..df1f2575fe 100644 --- a/src/gui/painting/qregion.cpp +++ b/src/gui/painting/qregion.cpp @@ -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 */ |