mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
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:
@@ -95,6 +95,7 @@ void V3LinkLevel::timescaling(const ModVec& mods) {
|
||||
for (AstNodeModule* modp : mods) {
|
||||
for (AstNode *nextp, *childp = modp->stmtsp(); childp; childp = nextp) {
|
||||
nextp = childp->nextp();
|
||||
// cppcheck-suppress constVariablePointer
|
||||
if (AstPragma* pragp = VN_CAST(childp, Pragma)) {
|
||||
if (pragp->pragType() == VPragmaType::TIMEUNIT_SET) {
|
||||
modp->timeunit(pragp->timescale());
|
||||
@@ -205,6 +206,7 @@ void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
||||
NameSet ioNames;
|
||||
NameSet dupNames;
|
||||
// For all modules, skipping over new top
|
||||
// cppcheck-suppress constVariablePointer
|
||||
for (AstNodeModule* oldmodp = VN_AS(rootp->modulesp()->nextp(), NodeModule);
|
||||
oldmodp && oldmodp->level() <= 2; oldmodp = VN_AS(oldmodp->nextp(), NodeModule)) {
|
||||
for (AstNode* subnodep = oldmodp->stmtsp(); subnodep; subnodep = subnodep->nextp()) {
|
||||
|
||||
Reference in New Issue
Block a user