summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-02-12 11:11:28 +0100
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-02-24 09:43:23 +0000
commit78236be8d734ead3d64ae20e7d5413e470125453 (patch)
tree7e288ff1f3a0a1b79b906d262fc20b0d37757231
parent08a84a8af8fe01c9b42702e7fa18d5dfb73950fa (diff)
Fix infinite loop
CID 176641: Control flow issues (STRAY_SEMICOLON) A "while" statement with no block followed by a stand-alone block is suspicious. CID 176639: Program hangs (INFINITE_LOOP) If "dx > 64L" is initially true then it will remain true. Fixes a bug introduced in 8c31f75fd31d2d83de557c0d5fb15edb384f8933. Coverity-Id: 176641 Coverity-Id: 176639 Change-Id: I5daa563fe94316633f9525583d8addb8864c42c0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/gui/painting/qgrayraster.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 0725038cc3..49e53973b0 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -1000,7 +1000,7 @@ QT_FT_END_STMNT
/* each bisection predictably reduces deviation exactly 4-fold. */
/* Even 32-bit deviation would vanish after 16 bisections. */
draw = 1;
- while ( dx > ONE_PIXEL / 4 );
+ while ( dx > ONE_PIXEL / 4 )
{
dx >>= 2;
draw <<= 1;