Unify code handling "x" and "u" scanf specifiers

This commit is contained in:
Dmitry-Me 2017-11-09 16:25:56 +03:00
parent 94dd63f196
commit 56ba48d705
1 changed files with 2 additions and 2 deletions

View File

@ -941,8 +941,8 @@ void CheckIO::checkFormatString(const Token * const tok,
if (argInfo.typeToken->str() != "int") if (argInfo.typeToken->str() != "int")
invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true); invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
else if (typesMatch(argInfo.typeToken->originalName(), "size_t") || else if (typesMatch(argInfo.typeToken->originalName(), "size_t") ||
typesMatch(argInfo.typeToken->originalName(), "ssize_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); invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
break; break;
} }