Internals: Use more standard syntax for avoiding unused variable warnings (#4826)

This commit is contained in:
Tim Hutt
2024-01-13 15:34:59 -05:00
committed by GitHub
parent c9d7486d16
commit 5073f208af
6 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -533,7 +533,7 @@ class TraceVisitor final : public VNVisitor {
addInitStr("const uint32_t base VL_ATTR_UNUSED = "
"vlSymsp->__Vm_baseCode + "
+ cvtToStr(baseCode) + ";\n");
addInitStr("if (false && bufp) {} // Prevent unused\n");
addInitStr("(void)bufp; // Prevent unused variable warning\n");
} else {
addInitStr("uint32_t* const oldp VL_ATTR_UNUSED = "
"bufp->oldp(vlSymsp->__Vm_baseCode + "