diff --git a/cppcheck.sup b/cppcheck.sup index 195b7e360..0814c13dc 100644 --- a/cppcheck.sup +++ b/cppcheck.sup @@ -1,3 +1,3 @@ // These are correct and are used to find the base (zero) pin. -thisSubtraction:netlist.h:4152 -thisSubtraction:netlist.h:4161 +thisSubtraction:netlist.h:4164 +thisSubtraction:netlist.h:4173 diff --git a/elab_lval.cc b/elab_lval.cc index 443578d9a..1997f89f3 100644 --- a/elab_lval.cc +++ b/elab_lval.cc @@ -116,6 +116,11 @@ NetAssign_* PEConcat::elaborate_lval(Design*des, NetAssign_*tmp = parms_[idx]->elaborate_lval(des, scope, is_force); + /* If the l-value doesn't elaborate, the error was + already detected and printed. We just skip it and let + the compiler catch more errors. */ + if (tmp == 0) continue; + if (tmp->expr_type() == IVL_VT_REAL) { cerr << parms_[idx]->get_fileline() << ": error: " << "concatenation operand can not be real: " @@ -124,11 +129,6 @@ NetAssign_* PEConcat::elaborate_lval(Design*des, continue; } - /* If the l-value doesn't elaborate, the error was - already detected and printed. We just skip it and let - the compiler catch more errors. */ - if (tmp == 0) continue; - /* Link the new l-value to the previous one. */ NetAssign_*last = tmp; while (last->more) diff --git a/vvp/Makefile.in b/vvp/Makefile.in index 604f4ce3a..7b00f9e5f 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -99,7 +99,8 @@ distclean: clean rm -f stamp-config-h config.h cppcheck: $(O:.o=.cc) libvpi.c draw_tt.c - cppcheck --enable=all -f $(INCLUDE_PATH) $^ + cppcheck --enable=all -f --suppressions $(srcdir)/cppcheck.sup \ + $(INCLUDE_PATH) $^ Makefile: $(srcdir)/Makefile.in cd ..; ./config.status --file=vvp/$@ diff --git a/vvp/cppcheck.sup b/vvp/cppcheck.sup new file mode 100644 index 000000000..2625cfcca --- /dev/null +++ b/vvp/cppcheck.sup @@ -0,0 +1,3 @@ +// The new() operator is always used to allocate space for this class and +// pool is defined there. +uninitVar:vvp_net.cc:153