From 773fd6cabb92ca2c55f0a8d923eb19347d60a105 Mon Sep 17 00:00:00 2001 From: prpr19xx <58330423+prpr19xx@users.noreply.github.com> Date: Mon, 21 Nov 2022 15:11:47 +0000 Subject: Silence compiler warning The Appveyor build generates this otherwise: In function 'Jim_WhileCoreCommand', inlined from 'Jim_WhileCoreCommand' at jim.c:12096:12: jim.c:12109:12: warning: 'boolean' may be used uninitialized [-Wmaybe-uninitialized] 12109 | if (!boolean) | ^ jim.c: In function 'Jim_WhileCoreCommand': jim.c:12105:13: note: 'boolean' was declared here 12105 | int boolean, retval; | ^~~~~~~ --- jim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jim.c') diff --git a/jim.c b/jim.c index 780d352..b984873 100644 --- a/jim.c +++ b/jim.c @@ -12114,7 +12114,7 @@ static int Jim_WhileCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *ar /* The general purpose implementation of while starts here */ while (1) { - int boolean, retval; + int boolean = 0, retval; if ((retval = Jim_GetBoolFromExpr(interp, argv[1], &boolean)) != JIM_OK) return retval; -- cgit v1.1