Fix FN for std::uintmax_t passed as %lx, %lu scanf read targets
This commit is contained in:
parent
b301b44897
commit
94dd63f196
|
@ -753,7 +753,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);
|
||||
break;
|
||||
case 'I':
|
||||
|
@ -790,7 +790,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);
|
||||
break;
|
||||
}
|
||||
|
@ -905,7 +905,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);
|
||||
break;
|
||||
case 'I':
|
||||
|
|
|
@ -1010,7 +1010,7 @@ private:
|
|||
TEST_SCANF_WARN_AKA("%lu","unsigned long","std::ssize_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA("%lu","unsigned long","std::ptrdiff_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA("%lu","unsigned long","std::intmax_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA_WIN64("%lu","unsigned long","std::uintmax_t", "unsigned long long");
|
||||
TEST_SCANF_WARN_AKA("%lu","unsigned long","std::uintmax_t", "unsigned long", "unsigned long long");
|
||||
TEST_SCANF_WARN_AKA("%lu","unsigned long","std::intptr_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA_WIN64("%lu","unsigned long","std::uintptr_t", "unsigned long long");
|
||||
|
||||
|
@ -1042,7 +1042,7 @@ private:
|
|||
TEST_SCANF_WARN_AKA("%lx","unsigned long","std::ssize_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA("%lx","unsigned long","std::ptrdiff_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA("%lx","unsigned long","std::intmax_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA_WIN64("%lx","unsigned long","std::uintmax_t", "unsigned long long");
|
||||
TEST_SCANF_WARN_AKA("%lx","unsigned long","std::uintmax_t", "unsigned long", "unsigned long long");
|
||||
TEST_SCANF_WARN_AKA("%lx","unsigned long","std::intptr_t", "signed long", "signed long long");
|
||||
TEST_SCANF_WARN_AKA_WIN64("%lx","unsigned long","std::uintptr_t", "unsigned long long");
|
||||
|
||||
|
|
Loading…
Reference in New Issue