Internals: Cleanup cppcheck warnings (#6317)

`make cppcheck-4` is now clean.
This commit is contained in:
Geza Lore
2025-08-20 18:21:24 +01:00
committed by GitHub
parent 3d3462b209
commit 67da797816
27 changed files with 195 additions and 141 deletions
+3
View File
@@ -85,6 +85,7 @@ class DeadVisitor final : public VNVisitor {
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
}
// cppcheck-suppress constParameterPointer
void checkAll(AstNode* nodep) {
if (AstNode* const subnodep = nodep->dtypep()) {
if (nodep != subnodep // Not NodeDTypes reference themselves
@@ -473,7 +474,9 @@ class DeadVisitor final : public VNVisitor {
}
}
// cppcheck-suppress constParameterPointer
void preserveTopIfaces(AstNetlist* rootp) {
// cppcheck-suppress constVariablePointer
for (AstNodeModule* modp = rootp->modulesp(); modp && modp->level() <= 2;
modp = VN_AS(modp->nextp(), NodeModule)) {
for (AstNode* subnodep = modp->stmtsp(); subnodep; subnodep = subnodep->nextp()) {