mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-06 01:24:10 +00:00
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();
|
} else log_abort();
|
||||||
if (part.justify == FmtPart::NUMERIC && part.group && part.padding == '0') {
|
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) {
|
while (prefix.size() + buf.size() < part.width) {
|
||||||
if (buf.size() % (group_size + 1) == group_size)
|
if (buf.size() % (group_size + 1) == group_size)
|
||||||
buf += '_';
|
buf += '_';
|
||||||
|
|
|
@ -1228,7 +1228,7 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep)
|
||||||
if (ff.has_srst && ff.has_ce && ff.ce_over_srst) {
|
if (ff.has_srst && ff.has_ce && ff.ce_over_srst) {
|
||||||
int srst = importDefSigSpec(ff.sig_srst, timestep-1).at(0);
|
int srst = importDefSigSpec(ff.sig_srst, timestep-1).at(0);
|
||||||
std::vector<int> rval = importDefSigSpec(ff.val_srst, timestep-1);
|
std::vector<int> rval = importDefSigSpec(ff.val_srst, timestep-1);
|
||||||
int undef_srst;
|
int undef_srst = -1;
|
||||||
std::vector<int> undef_rval;
|
std::vector<int> undef_rval;
|
||||||
if (model_undef) {
|
if (model_undef) {
|
||||||
undef_srst = importUndefSigSpec(ff.sig_srst, timestep-1).at(0);
|
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) {
|
if (ff.has_ce) {
|
||||||
int ce = importDefSigSpec(ff.sig_ce, timestep-1).at(0);
|
int ce = importDefSigSpec(ff.sig_ce, timestep-1).at(0);
|
||||||
std::vector<int> old_q = importDefSigSpec(ff.sig_q, timestep-1);
|
std::vector<int> old_q = importDefSigSpec(ff.sig_q, timestep-1);
|
||||||
int undef_ce;
|
int undef_ce = -1;
|
||||||
std::vector<int> undef_old_q;
|
std::vector<int> undef_old_q;
|
||||||
if (model_undef) {
|
if (model_undef) {
|
||||||
undef_ce = importUndefSigSpec(ff.sig_ce, timestep-1).at(0);
|
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)) {
|
if (ff.has_srst && !(ff.has_ce && ff.ce_over_srst)) {
|
||||||
int srst = importDefSigSpec(ff.sig_srst, timestep-1).at(0);
|
int srst = importDefSigSpec(ff.sig_srst, timestep-1).at(0);
|
||||||
std::vector<int> rval = importDefSigSpec(ff.val_srst, timestep-1);
|
std::vector<int> rval = importDefSigSpec(ff.val_srst, timestep-1);
|
||||||
int undef_srst;
|
int undef_srst = -1;
|
||||||
std::vector<int> undef_rval;
|
std::vector<int> undef_rval;
|
||||||
if (model_undef) {
|
if (model_undef) {
|
||||||
undef_srst = importUndefSigSpec(ff.sig_srst, timestep-1).at(0);
|
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;
|
fst_off_t blkpos = 0, prev_blkpos;
|
||||||
uint64_t beg_tim, end_tim, beg_tim2, end_tim2;
|
uint64_t beg_tim, end_tim, beg_tim2, end_tim2;
|
||||||
int sectype;
|
int sectype;
|
||||||
|
#ifdef FST_DEBUG
|
||||||
unsigned int secnum = 0;
|
unsigned int secnum = 0;
|
||||||
|
#endif
|
||||||
uint64_t seclen;
|
uint64_t seclen;
|
||||||
uint64_t tsec_uclen = 0, tsec_clen = 0;
|
uint64_t tsec_uclen = 0, tsec_clen = 0;
|
||||||
uint64_t tsec_nitems;
|
uint64_t tsec_nitems;
|
||||||
|
@ -5620,7 +5622,9 @@ char *fstReaderGetValueFromHandleAtTime(void *ctx, uint64_t tim, fstHandle facid
|
||||||
}
|
}
|
||||||
|
|
||||||
blkpos += seclen;
|
blkpos += seclen;
|
||||||
|
#ifdef FST_DEBUG
|
||||||
secnum++;
|
secnum++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
xc->rvat_beg_tim = beg_tim;
|
xc->rvat_beg_tim = beg_tim;
|
||||||
|
|
|
@ -1718,7 +1718,7 @@ struct AbcPass : public Pass {
|
||||||
show_tempdir = true;
|
show_tempdir = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t argidx, g_argidx;
|
size_t argidx, g_argidx = -1;
|
||||||
bool g_arg_from_cmd = false;
|
bool g_arg_from_cmd = false;
|
||||||
#if defined(__wasm)
|
#if defined(__wasm)
|
||||||
const char *pwd = ".";
|
const char *pwd = ".";
|
||||||
|
|
Loading…
Reference in a new issue