From 1e46a14ba79c3a6883a526e29514aa6fe85fafd2 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Mon, 19 Oct 2020 12:28:41 -0700 Subject: [PATCH] I1401: Compiler warning cleanup Initialize local state variables to 0. Likely non functional changes due to lack of depth in static analysis scan. Coverity detects real problems like this. --- I1401/i1401_cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/I1401/i1401_cpu.c b/I1401/i1401_cpu.c index f54f4060..435621b6 100644 --- a/I1401/i1401_cpu.c +++ b/I1401/i1401_cpu.c @@ -522,7 +522,7 @@ static const int32 mtf_mod[] = { t_stat sim_instr (void) { int32 IS, ilnt, flags; -int32 op, xa, t, wm, ioind, dev, unit; +int32 op, xa, t, wm, ioind = 0, dev = 0, unit = 0; int32 a, b, i, k, asave, bsave; int32 carry, lowprd, sign, ps; int32 quo, qs; @@ -1160,7 +1160,7 @@ CHECK_LENGTH: reason = STOP_INVL; break; } - if (ioind != BCD_PERCNT) { /* valid dev addr? */ + if (ioind != BCD_PERCNT) { /* valid dev addr? */ reason = STOP_INVA; break; }