From ae0cdd9fea03e3ac56e923aa711617bb2cec1dc2 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sun, 29 Sep 2024 23:00:00 +0100 Subject: [PATCH] graphics/grClip.c Branch condition evaluates to a garbage value This is technically a false positive as grClipPoints() will always initializes a value to ok1 and ok2 when called. The function is in the same compile unit, so probably the compiler can see this as well and potentially not perform the initiailization begin performed in this commit. But to quieten and remove this item from the analysis report assigning an initialization value. SonarCloud graphics/grClip.c:451 Branch condition evaluates to a garbage value https://sonarcloud.io/project/issues?open=AZJB160MNGfDNup0Rit4&id=dlmiles_magic --- graphics/grClip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/grClip.c b/graphics/grClip.c index 7631ba75..d90b5500 100644 --- a/graphics/grClip.c +++ b/graphics/grClip.c @@ -434,7 +434,7 @@ GrClipLine(x1, y1, x2, y2) { Point p1, p2; Rect c; - bool ok1, ok2; + bool ok1 = FALSE, ok2 = FALSE; c = ob->r_r; c.r_xbot--; c.r_ybot--; c.r_xtop++; c.r_ytop++;