CheckOther::memsetZeroBytesError: remove now unused parameter.
was: lib/checkother.cpp:1116:76: warning: unused parameter ‘varname’ [-Wunused-parameter] void CheckOther::memsetZeroBytesError(const Token *tok, const std::string &varname) ^
This commit is contained in:
parent
7802517a69
commit
e9e496199c
|
@ -1107,13 +1107,13 @@ void CheckOther::checkMemsetZeroBytes()
|
||||||
if (Token::simpleMatch(tok, "memset (") && (numberOfArguments(tok)==3)) {
|
if (Token::simpleMatch(tok, "memset (") && (numberOfArguments(tok)==3)) {
|
||||||
const Token* lastParamTok = tok->next()->link()->previous();
|
const Token* lastParamTok = tok->next()->link()->previous();
|
||||||
if (lastParamTok->str() == "0")
|
if (lastParamTok->str() == "0")
|
||||||
memsetZeroBytesError(tok, tok->strAt(2));
|
memsetZeroBytesError(tok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckOther::memsetZeroBytesError(const Token *tok, const std::string &varname)
|
void CheckOther::memsetZeroBytesError(const Token *tok)
|
||||||
{
|
{
|
||||||
const std::string summary("memset() called to fill 0 bytes.");
|
const std::string summary("memset() called to fill 0 bytes.");
|
||||||
const std::string verbose(summary + " The second and third arguments might be inverted."
|
const std::string verbose(summary + " The second and third arguments might be inverted."
|
||||||
|
|
|
@ -234,7 +234,7 @@ private:
|
||||||
void suspiciousEqualityComparisonError(const Token* tok);
|
void suspiciousEqualityComparisonError(const Token* tok);
|
||||||
void selfAssignmentError(const Token *tok, const std::string &varname);
|
void selfAssignmentError(const Token *tok, const std::string &varname);
|
||||||
void misusedScopeObjectError(const Token *tok, const std::string &varname);
|
void misusedScopeObjectError(const Token *tok, const std::string &varname);
|
||||||
void memsetZeroBytesError(const Token *tok, const std::string &varname);
|
void memsetZeroBytesError(const Token *tok);
|
||||||
void memsetFloatError(const Token *tok, const std::string &var_value);
|
void memsetFloatError(const Token *tok, const std::string &var_value);
|
||||||
void memsetValueOutOfRangeError(const Token *tok, const std::string &value);
|
void memsetValueOutOfRangeError(const Token *tok, const std::string &value);
|
||||||
void duplicateBranchError(const Token *tok1, const Token *tok2);
|
void duplicateBranchError(const Token *tok1, const Token *tok2);
|
||||||
|
@ -289,7 +289,7 @@ private:
|
||||||
c.suspiciousCaseInSwitchError(0, "||");
|
c.suspiciousCaseInSwitchError(0, "||");
|
||||||
c.suspiciousEqualityComparisonError(0);
|
c.suspiciousEqualityComparisonError(0);
|
||||||
c.selfAssignmentError(0, "varname");
|
c.selfAssignmentError(0, "varname");
|
||||||
c.memsetZeroBytesError(0, "varname");
|
c.memsetZeroBytesError(0);
|
||||||
c.memsetFloatError(0, "varname");
|
c.memsetFloatError(0, "varname");
|
||||||
c.memsetValueOutOfRangeError(0, "varname");
|
c.memsetValueOutOfRangeError(0, "varname");
|
||||||
c.clarifyCalculationError(0, "+");
|
c.clarifyCalculationError(0, "+");
|
||||||
|
|
Loading…
Reference in New Issue