diff --git a/kernel/fmt.cc b/kernel/fmt.cc index cbf2d12e9..d1c6b8ac9 100644 --- a/kernel/fmt.cc +++ b/kernel/fmt.cc @@ -832,7 +832,7 @@ std::string Fmt::render() const } } else log_abort(); if (part.justify == FmtPart::NUMERIC && part.group && part.padding == '0') { - int group_size = part.base == 10 ? 3 : 4; + size_t group_size = part.base == 10 ? 3 : 4; while (prefix.size() + buf.size() < part.width) { if (buf.size() % (group_size + 1) == group_size) buf += '_'; diff --git a/kernel/satgen.cc b/kernel/satgen.cc index baaf22d1f..a6db78868 100644 --- a/kernel/satgen.cc +++ b/kernel/satgen.cc @@ -1228,7 +1228,7 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep) if (ff.has_srst && ff.has_ce && ff.ce_over_srst) { int srst = importDefSigSpec(ff.sig_srst, timestep-1).at(0); std::vector rval = importDefSigSpec(ff.val_srst, timestep-1); - int undef_srst; + int undef_srst = -1; std::vector undef_rval; if (model_undef) { undef_srst = importUndefSigSpec(ff.sig_srst, timestep-1).at(0); @@ -1242,7 +1242,7 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep) if (ff.has_ce) { int ce = importDefSigSpec(ff.sig_ce, timestep-1).at(0); std::vector old_q = importDefSigSpec(ff.sig_q, timestep-1); - int undef_ce; + int undef_ce = -1; std::vector undef_old_q; if (model_undef) { undef_ce = importUndefSigSpec(ff.sig_ce, timestep-1).at(0); @@ -1256,7 +1256,7 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep) if (ff.has_srst && !(ff.has_ce && ff.ce_over_srst)) { int srst = importDefSigSpec(ff.sig_srst, timestep-1).at(0); std::vector rval = importDefSigSpec(ff.val_srst, timestep-1); - int undef_srst; + int undef_srst = -1; std::vector undef_rval; if (model_undef) { undef_srst = importUndefSigSpec(ff.sig_srst, timestep-1).at(0); diff --git a/libs/fst/fstapi.cc b/libs/fst/fstapi.cc index 592b5cae6..14c981a42 100644 --- a/libs/fst/fstapi.cc +++ b/libs/fst/fstapi.cc @@ -5536,7 +5536,9 @@ char *fstReaderGetValueFromHandleAtTime(void *ctx, uint64_t tim, fstHandle facid fst_off_t blkpos = 0, prev_blkpos; uint64_t beg_tim, end_tim, beg_tim2, end_tim2; int sectype; +#ifdef FST_DEBUG unsigned int secnum = 0; +#endif uint64_t seclen; uint64_t tsec_uclen = 0, tsec_clen = 0; uint64_t tsec_nitems; @@ -5620,7 +5622,9 @@ char *fstReaderGetValueFromHandleAtTime(void *ctx, uint64_t tim, fstHandle facid } blkpos += seclen; +#ifdef FST_DEBUG secnum++; +#endif } xc->rvat_beg_tim = beg_tim; diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc index b33e1a17d..07f9ee45d 100644 --- a/passes/techmap/abc.cc +++ b/passes/techmap/abc.cc @@ -1718,7 +1718,7 @@ struct AbcPass : public Pass { show_tempdir = true; } - size_t argidx, g_argidx; + size_t argidx, g_argidx = -1; bool g_arg_from_cmd = false; #if defined(__wasm) const char *pwd = ".";