From 973c9a4d1a66f09169d0437a52ff269ed18739b9 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sun, 29 Sep 2024 23:00:00 +0100 Subject: [PATCH] database/DBio.c read of variable before initialization Due to FEOF condition and handling it is possible local variable 'c' is not initialized before being read and compared. SonarCloud retails DBio.c:3049 The left operand of '==' is a garbage value https://sonarcloud.io/project/issues?open=AZJB16rxNGfDNup0Ribf&id=dlmiles_magic --- database/DBio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/DBio.c b/database/DBio.c index 330afcda..c30dff12 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -3034,7 +3034,7 @@ dbFgets(line, len, f) { char *cs; int l; - int c; + int c = EOF; do {