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")
invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
else if (typesMatch(argInfo.typeToken->originalName(), "size_t") ||
typesMatch(argInfo.typeToken->originalName(), "ssize_t") ||
argInfo.typeToken->originalName() == "uintmax_t")
typesMatch(argInfo.typeToken->originalName(), "ptrdiff_t") ||
typesMatch(argInfo.typeToken->originalName(), "uintmax_t"))
invalidScanfArgTypeError_int(tok, numFormat, specifier, &argInfo, true);
break;
}