Fix FN for intmax_t passed as %jx into printf
This commit is contained in:
parent
73414ee56c
commit
cf05b722a9
|
@ -1007,8 +1007,7 @@ void CheckIO::checkFormatString(const Token * const tok,
|
|||
invalidPrintfArgTypeError_uint(tok, numFormat, specifier, &argInfo);
|
||||
break;
|
||||
case 'j':
|
||||
if (!(argInfo.typeToken->originalName() == "intmax_t" ||
|
||||
argInfo.typeToken->originalName() == "uintmax_t"))
|
||||
if (argInfo.typeToken->originalName() != "uintmax_t")
|
||||
invalidPrintfArgTypeError_uint(tok, numFormat, specifier, &argInfo);
|
||||
break;
|
||||
case 'z':
|
||||
|
|
|
@ -3677,7 +3677,7 @@ private:
|
|||
TEST_PRINTF_WARN_AKA("%jx", "uintmax_t", "ssize_t", "signed long", "signed long long");
|
||||
TEST_PRINTF_WARN_AKA("%jx", "uintmax_t", "ptrdiff_t", "signed long", "signed long long");
|
||||
TEST_PRINTF_WARN_AKA("%jx", "uintmax_t", "unsigned ptrdiff_t", "unsigned long", "unsigned long long");
|
||||
//TODO TEST_PRINTF_WARN_AKA("%jx", "uintmax_t", "intmax_t", "signed long", "signed long long");
|
||||
TEST_PRINTF_WARN_AKA("%jx", "uintmax_t", "intmax_t", "signed long", "signed long long");
|
||||
TEST_PRINTF_NOWARN("%jx", "uintmax_t", "uintmax_t");
|
||||
TEST_PRINTF_WARN_AKA("%jx", "uintmax_t", "std::size_t", "unsigned long", "unsigned long long");
|
||||
TEST_PRINTF_WARN_AKA("%jx", "uintmax_t", "std::ssize_t", "signed long", "signed long long");
|
||||
|
|
Loading…
Reference in New Issue