Internals: Fix remaining cppcheck errors (#6319)

Fixed the non const-related issue and added suppressions for the const
ones. With that `make cppcheck` should be clean.
This commit is contained in:
Geza Lore
2025-08-21 09:43:37 +01:00
committed by GitHub
parent bd91b619ad
commit 327d55d13d
64 changed files with 266 additions and 134 deletions
+2 -2
View File
@@ -637,14 +637,14 @@ class LinkCellsVisitor final : public VNVisitor {
}
nodep->unlinkFrBack();
VL_DO_DANGLING(pushDeletep(nodep), nodep);
} else if (!libFoundp && globalFoundp && globalFoundp != nodep) {
} else if (globalFoundp && globalFoundp != nodep) {
// ...__LIB__ stripped by prettyName
const string newName = nodep->libname() + "__LIB__" + nodep->origName();
UINFO(9, "Module rename as in multiple libraries " << newName << " <- " << nodep);
insertModInLib(nodep->origName(), nodep->libname(), nodep); // Original name
nodep->name(newName);
insertModInLib(nodep->name(), "__GLOBAL", nodep);
} else if (!libFoundp) {
} else {
insertModInLib(nodep->origName(), nodep->libname(), nodep);
insertModInLib(nodep->name(), "__GLOBAL", nodep);
}