Fixed Cppcheck warning; Remove unused private method CheckBufferOverrun::bufferNotZeroTerminatedError
This commit is contained in:
parent
2530b36d9d
commit
c6452adc88
|
@ -726,17 +726,6 @@ void CheckBufferOverrun::terminateStrncpyError(const Token *tok, const std::stri
|
|||
"assumes buffer is null-terminated.", CWE170, true);
|
||||
}
|
||||
|
||||
void CheckBufferOverrun::bufferNotZeroTerminatedError(const Token *tok, const std::string &varname, const std::string &function)
|
||||
{
|
||||
const std::string errmsg = "$symbol:" + varname + '\n' +
|
||||
"$symbol:" + function + '\n' +
|
||||
"The buffer '" + varname + "' is not null-terminated after the call to " + function + "().\n"
|
||||
"The buffer '" + varname + "' is not null-terminated after the call to " + function + "(). "
|
||||
"This will cause bugs later in the code if the code assumes the buffer is null-terminated.";
|
||||
|
||||
reportError(tok, Severity::warning, "bufferNotZeroTerminated", errmsg, CWE170, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -111,7 +111,6 @@ private:
|
|||
|
||||
void stringNotZeroTerminated();
|
||||
void terminateStrncpyError(const Token *tok, const std::string &varname);
|
||||
void bufferNotZeroTerminatedError(const Token *tok, const std::string &varname, const std::string &function);
|
||||
|
||||
void objectIndex();
|
||||
void objectIndexError(const Token *tok, const ValueFlow::Value *v, bool known);
|
||||
|
|
Loading…
Reference in New Issue