checkio: Add missing id "invalidScanfFormatWidth_smaller" to errorlist output (#1533)
This commit is contained in:
parent
d528934139
commit
a1a695dcda
|
@ -1982,7 +1982,7 @@ void CheckIO::invalidScanfFormatWidthError(const Token* tok, unsigned int numFor
|
|||
|
||||
std::ostringstream errmsg;
|
||||
if (arrlen > width) {
|
||||
if (!mSettings->inconclusive || !mSettings->isEnabled(Settings::WARNING))
|
||||
if (tok != nullptr && (!mSettings->inconclusive || !mSettings->isEnabled(Settings::WARNING)))
|
||||
return;
|
||||
errmsg << "Width " << width << " given in format string (no. " << numFormat << ") is smaller than destination buffer"
|
||||
<< " '" << varname << "[" << arrlen << "]'.";
|
||||
|
|
|
@ -162,6 +162,7 @@ private:
|
|||
c.invalidPrintfArgTypeError_float(nullptr, 1, "f", nullptr);
|
||||
c.invalidLengthModifierError(nullptr, 1, "I");
|
||||
c.invalidScanfFormatWidthError(nullptr, 10, 5, nullptr, 's');
|
||||
c.invalidScanfFormatWidthError(nullptr, 99, -1, nullptr, 's');
|
||||
c.wrongPrintfScanfPosixParameterPositionError(nullptr, "printf", 2, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue