Fix FN for std::uintmax_t passed as %llx, %llu scanf read targets
This commit is contained in:
parent
cc08d51505
commit
78be821431
|
@ -747,7 +747,7 @@ void CheckIO::checkFormatString(const Token * const tok,
|
|||
invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
|
||||
else if (typesMatch(argInfo.typeToken->originalName(), "size_t") ||
|
||||
typesMatch(argInfo.typeToken->originalName(), "ptrdiff_t") ||
|
||||
typesMatch(argInfo.typeToken->originalName(), "intmax_t", "u"))
|
||||
typesMatch(argInfo.typeToken->originalName(), "uintmax_t"))
|
||||
invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
|
||||
} else if (argInfo.typeToken->str() != "long" || argInfo.typeToken->isLong())
|
||||
invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
|
||||
|
@ -899,7 +899,7 @@ void CheckIO::checkFormatString(const Token * const tok,
|
|||
invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
|
||||
else if (typesMatch(argInfo.typeToken->originalName(), "size_t") ||
|
||||
typesMatch(argInfo.typeToken->originalName(), "ptrdiff_t") ||
|
||||
argInfo.typeToken->originalName() == "uintmax_t")
|
||||
typesMatch(argInfo.typeToken->originalName(), "uintmax_t"))
|
||||
invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
|
||||
} else if (argInfo.typeToken->str() != "long" || argInfo.typeToken->isLong())
|
||||
invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
|
||||
|
|
|
@ -1084,7 +1084,7 @@ private:
|
|||
TEST_SCANF_WARN_AKA("%llu","unsigned long long","std::ssize_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA("%llu","unsigned long long","std::ptrdiff_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA("%llu","unsigned long long","std::intmax_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA_WIN32("%llu","unsigned long long","std::uintmax_t", "unsigned long");
|
||||
TEST_SCANF_WARN_AKA("%llu","unsigned long long","std::uintmax_t", "unsigned long", "unsigned long long");
|
||||
TEST_SCANF_WARN_AKA("%llu","unsigned long long","std::intptr_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA_WIN32("%llu","unsigned long long","std::uintptr_t", "unsigned long");
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ private:
|
|||
TEST_SCANF_WARN_AKA("%llx","unsigned long long","std::ssize_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA("%llx","unsigned long long","std::ptrdiff_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA("%llx","unsigned long long","std::intmax_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA_WIN32("%llx","unsigned long long","std::uintmax_t", "unsigned long");
|
||||
TEST_SCANF_WARN_AKA("%llx","unsigned long long","std::uintmax_t", "unsigned long", "unsigned long long");
|
||||
TEST_SCANF_WARN_AKA("%llx","unsigned long long","std::intptr_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA_WIN32("%llx","unsigned long long","std::uintptr_t", "unsigned long");
|
||||
|
||||
|
|
Loading…
Reference in New Issue