From e786a2fa5e0413b094c5cf358ff53c0a5943965f Mon Sep 17 00:00:00 2001 From: Stefan Naewe Date: Fri, 8 Feb 2013 11:43:35 +0100 Subject: [PATCH] lib/checkother: fix compiler warning about unused member Found by clang: lib/checkother.cpp:2992:31: warning: private field '_symbolDatabase' is not used [-Wunused-private-field] const SymbolDatabase *_symbolDatabase; Signed-off-by: Stefan Naewe --- lib/checkother.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 3fb2b226c..3b9580446 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -2945,11 +2945,9 @@ namespace { class Expressions { public: - Expressions(const SymbolDatabase *symbolDatabase, const - std::list &constFunctions) + Expressions(const std::list &constFunctions) : _start(0), _lastTokens(0), - _symbolDatabase(symbolDatabase), _constFunctions(constFunctions) { } void endExpr(const Token *end) { @@ -2989,7 +2987,6 @@ namespace { std::ostringstream _expression; const Token *_start; ExpressionTokens *_lastTokens; - const SymbolDatabase *_symbolDatabase; const std::list &_constFunctions; }; @@ -3030,7 +3027,7 @@ void CheckOther::checkExpressionRange(const std::list &constFun { if (!start || !end) return; - Expressions expressions(_tokenizer->getSymbolDatabase(), constFunctions); + Expressions expressions(constFunctions); std::string opName; int level = 0; for (const Token *tok = start->next(); tok && tok != end; tok = tok->next()) {