Fix some cppcheck warnings. No functional change intended.

This commit is contained in:
Wilson Snyder
2025-03-27 19:46:59 -04:00
parent 5e69faff46
commit 98b89d0f2c
9 changed files with 17 additions and 20 deletions
+2 -3
View File
@@ -1952,9 +1952,8 @@ string V3Task::assignInternalToDpi(AstVar* portp, bool isPtr, const string& frSu
const string idx = portp->name() + "__Vidx";
stmt = "for (size_t " + idx + " = 0; " + idx + " < " + cvtToStr(unpackSize) + "; ++" + idx
+ ") ";
stmt += (isBit ? "VL_SET_SVBV_" : "VL_SET_SVLV_")
+ string{portp->dtypep()->skipRefp()->charIQWN()} + "(" + cvtToStr(portp->width())
+ ", ";
stmt += (isBit ? "VL_SET_SVBV_"s : "VL_SET_SVLV_"s)
+ portp->dtypep()->skipRefp()->charIQWN() + "(" + cvtToStr(portp->width()) + ", ";
stmt += toName + " + " + cvtToStr(portp->dtypep()->skipRefp()->widthWords()) + " * " + idx
+ ", ";
if (unpackDim > 0) { // Access multi-dimensional array as a 1D array