Fixed GCC (testsymboldatabase.cpp) and MSVC (checkother.cpp) warnings

This commit is contained in:
PKEuS 2015-02-18 21:19:36 +01:00
parent 6a7605271a
commit 6227abac73
2 changed files with 1 additions and 3 deletions

View File

@ -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();

View File

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