Internal: cppcheck fixes. No functional change intended.

This commit is contained in:
Wilson Snyder
2022-11-27 05:52:40 -05:00
parent 4b3731d318
commit 833780fac1
40 changed files with 175 additions and 121 deletions
+5 -5
View File
@@ -322,10 +322,8 @@ class EmitCSyms final : EmitCBaseVisitor {
// UINFO(9,"scnameins sp "<<nodep->name()<<" sp "<<nodep->scopePrettySymName()
// <<" ss"<<name<<endl);
const int timeunit = m_modp ? m_modp->timeunit().powerOfTen() : 0;
if (m_scopeNames.find(name) == m_scopeNames.end()) {
m_scopeNames.emplace(
name, ScopeData(name, nodep->scopePrettySymName(), timeunit, "SCOPE_OTHER"));
}
m_scopeNames.emplace(
name, ScopeData(name, nodep->scopePrettySymName(), timeunit, "SCOPE_OTHER"));
if (nodep->dpiExport()) {
UASSERT_OBJ(m_cfuncp, nodep, "ScopeName not under DPI function");
m_scopeFuncs.insert(std::make_pair(name + " " + m_cfuncp->name(),
@@ -984,7 +982,7 @@ void EmitCSyms::emitDpiHdr() {
const string filename = v3Global.opt.makeDir() + "/" + topClassName() + "__Dpi.h";
AstCFile* const cfilep = newCFile(filename, false /*slow*/, false /*source*/);
cfilep->support(true);
V3OutCFile hf(filename);
V3OutCFile hf{filename};
m_ofp = &hf;
m_ofp->putsHeader();
@@ -1029,6 +1027,7 @@ void EmitCSyms::emitDpiHdr() {
puts("#endif\n");
ofp()->putsEndGuard();
m_ofp = nullptr;
}
//######################################################################
@@ -1083,6 +1082,7 @@ void EmitCSyms::emitDpiImp() {
puts("\n");
}
}
m_ofp = nullptr;
}
//######################################################################