From 6227abac73ee3e7567eec10b35f9a9d7588c32cc Mon Sep 17 00:00:00 2001 From: PKEuS Date: Wed, 18 Feb 2015 21:19:36 +0100 Subject: [PATCH] Fixed GCC (testsymboldatabase.cpp) and MSVC (checkother.cpp) warnings --- lib/checkother.cpp | 2 +- test/testsymboldatabase.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 14615f652..fbb4bcb87 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -2209,7 +2209,7 @@ void CheckOther::checkDuplicateExpression() if (assignment) selfAssignmentError(tok, tok->astOperand1()->expressionString()); else { - if (_settings->CPP && _settings->standards.CPP11 && tok->str() == "==") { + if (_tokenizer->isCPP() && _settings->standards.CPP11 && tok->str() == "==") { const Token* parent = tok->astParent(); while (parent && parent->astParent()) { parent = parent->astParent(); diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index 7b3fca60b..a5b798eb5 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -24,7 +24,6 @@ #define GET_SYMBOL_DB(code) \ errout.str(""); \ - Settings settings; \ Tokenizer tokenizer(&settings, this); \ std::istringstream istr(code); \ tokenizer.tokenize(istr, "test.cpp"); \ @@ -32,7 +31,6 @@ #define GET_SYMBOL_DB_C(code) \ errout.str(""); \ - Settings settings; \ Tokenizer tokenizer(&settings, this); \ std::istringstream istr(code); \ tokenizer.tokenize(istr, "test.c"); \