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:
Matthias Krüger 2016-01-12 23:55:02 +01:00
parent 7802517a69
commit e9e496199c
2 changed files with 4 additions and 4 deletions

View File

@ -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."

View File

@ -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, "+");