diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 12b21e3c9..7dfff496c 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1107,13 +1107,13 @@ void CheckOther::checkMemsetZeroBytes() if (Token::simpleMatch(tok, "memset (") && (numberOfArguments(tok)==3)) { const Token* lastParamTok = tok->next()->link()->previous(); 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 verbose(summary + " The second and third arguments might be inverted." diff --git a/lib/checkother.h b/lib/checkother.h index 9ee5e5778..db8d0666a 100644 --- a/lib/checkother.h +++ b/lib/checkother.h @@ -234,7 +234,7 @@ private: void suspiciousEqualityComparisonError(const Token* tok); void selfAssignmentError(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 memsetValueOutOfRangeError(const Token *tok, const std::string &value); void duplicateBranchError(const Token *tok1, const Token *tok2); @@ -289,7 +289,7 @@ private: c.suspiciousCaseInSwitchError(0, "||"); c.suspiciousEqualityComparisonError(0); c.selfAssignmentError(0, "varname"); - c.memsetZeroBytesError(0, "varname"); + c.memsetZeroBytesError(0); c.memsetFloatError(0, "varname"); c.memsetValueOutOfRangeError(0, "varname"); c.clarifyCalculationError(0, "+");