From e9e496199ce299d39ac9e512d52401ff7034d355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Tue, 12 Jan 2016 23:55:02 +0100 Subject: [PATCH] CheckOther::memsetZeroBytesError: remove now unused parameter. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit was: lib/checkother.cpp:1116:76: warning: unused parameter ‘varname’ [-Wunused-parameter] void CheckOther::memsetZeroBytesError(const Token *tok, const std::string &varname) ^ --- lib/checkother.cpp | 4 ++-- lib/checkother.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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, "+");