From 78236be8d734ead3d64ae20e7d5413e470125453 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Sun, 12 Feb 2017 11:11:28 +0100 Subject: [PATCH] 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 --- src/gui/painting/qgrayraster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;