Internals: cppcheck fixes. No functional change. (#6687)

This commit is contained in:
Wilson Snyder
2025-11-12 18:54:22 -05:00
committed by GitHub
parent 67094f6a88
commit 5c0ad5bd1f
38 changed files with 122 additions and 111 deletions
+2
View File
@@ -920,6 +920,7 @@ string V3Number::emitC() const VL_MT_STABLE {
} else if (words() == 2) { // Quad
const uint64_t qnum = static_cast<uint64_t>(toUQuad());
const char* const fmt = (qnum < 10) ? ("%" PRIx64 "ULL") : ("0x%016" PRIx64 "ULL");
// cppcheck-suppress wrongPrintfScanfArgNum
VL_SNPRINTF(sbuf, bufsize, fmt, qnum);
return sbuf;
} else {
@@ -930,6 +931,7 @@ string V3Number::emitC() const VL_MT_STABLE {
: (width() > 16) ? ("0x%08" PRIx32 "U")
: (width() > 8) ? ("0x%04" PRIx32 "U")
: ("0x%02" PRIx32 "U");
// cppcheck-suppress wrongPrintfScanfArgNum
VL_SNPRINTF(sbuf, bufsize, fmt, unum);
return sbuf;
}