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
+2
View File
@@ -342,8 +342,10 @@ class ParamProcessor final {
// particularly robust for type parameters. We should really have a type
// equivalence predicate function.
const string key = paramValueKey(nodep);
// cppcheck-has-bug-suppress unreadVariable
V3Hash hash = V3Hasher::uncachedHash(nodep);
// Force hash collisions -- for testing only
// cppcheck-has-bug-suppress unreadVariable
if (VL_UNLIKELY(v3Global.opt.debugCollision())) hash = V3Hash{};
int num;
const auto it = m_valueMap.find(hash);