mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 02:23:19 +02:00
Internals: Fix cppcheck warnings; add VL_DANGLING. No functional change.
This commit is contained in:
+4
-4
@@ -163,7 +163,7 @@ public:
|
||||
}
|
||||
void deleteAssign (AstNodeAssign* nodep) {
|
||||
UINFO(5, "Delete "<<nodep<<endl);
|
||||
nodep->unlinkFrBack()->deleteTree(); nodep=NULL;
|
||||
nodep->unlinkFrBack()->deleteTree(); VL_DANGLING(nodep);
|
||||
}
|
||||
void deleteUnusedAssign() {
|
||||
// If there are unused assignments in this var, kill them
|
||||
@@ -310,7 +310,7 @@ private:
|
||||
}
|
||||
if (debug()>5) newp->dumpTree(cout," w_new: ");
|
||||
nodep->replaceWith(newp);
|
||||
pushDeletep(nodep); nodep=NULL;
|
||||
pushDeletep(nodep); VL_DANGLING(nodep);
|
||||
++m_statSubsts;
|
||||
}
|
||||
virtual void visit(AstWordSel* nodep, AstNUser*) {
|
||||
@@ -329,7 +329,7 @@ private:
|
||||
// Check that the RHS hasn't changed value since we recorded it.
|
||||
SubstUseVisitor visitor (substp, entryp->getWordStep(word));
|
||||
if (visitor.ok()) {
|
||||
replaceSubstEtc(nodep, substp); nodep=NULL;
|
||||
replaceSubstEtc(nodep, substp); VL_DANGLING(nodep);
|
||||
} else {
|
||||
entryp->consumeWord(word);
|
||||
}
|
||||
@@ -357,7 +357,7 @@ private:
|
||||
SubstUseVisitor visitor (substp, entryp->getWholeStep());
|
||||
if (visitor.ok()) {
|
||||
UINFO(8," USEwhole "<<nodep<<endl);
|
||||
replaceSubstEtc(nodep, substp); nodep=NULL;
|
||||
replaceSubstEtc(nodep, substp); VL_DANGLING(nodep);
|
||||
} else {
|
||||
UINFO(8," USEwholeButChg "<<nodep<<endl);
|
||||
entryp->consumeWhole();
|
||||
|
||||
Reference in New Issue
Block a user