mirror of https://github.com/YosysHQ/yosys.git
Address warnings
- Setting default values - Fixing mismatched types - Guarding unused var
This commit is contained in:
parent
ceba889641
commit
7b47f645d7
|
@ -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 += '_';
|
||||
|
|
|
@ -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<int> rval = importDefSigSpec(ff.val_srst, timestep-1);
|
||||
int undef_srst;
|
||||
int undef_srst = -1;
|
||||
std::vector<int> 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<int> old_q = importDefSigSpec(ff.sig_q, timestep-1);
|
||||
int undef_ce;
|
||||
int undef_ce = -1;
|
||||
std::vector<int> 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<int> rval = importDefSigSpec(ff.val_srst, timestep-1);
|
||||
int undef_srst;
|
||||
int undef_srst = -1;
|
||||
std::vector<int> undef_rval;
|
||||
if (model_undef) {
|
||||
undef_srst = importUndefSigSpec(ff.sig_srst, timestep-1).at(0);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = ".";
|
||||
|
|
Loading…
Reference in New Issue