Fixed GCC (testsymboldatabase.cpp) and MSVC (checkother.cpp) warnings
This commit is contained in:
parent
6a7605271a
commit
6227abac73
|
@ -2209,7 +2209,7 @@ void CheckOther::checkDuplicateExpression()
|
||||||
if (assignment)
|
if (assignment)
|
||||||
selfAssignmentError(tok, tok->astOperand1()->expressionString());
|
selfAssignmentError(tok, tok->astOperand1()->expressionString());
|
||||||
else {
|
else {
|
||||||
if (_settings->CPP && _settings->standards.CPP11 && tok->str() == "==") {
|
if (_tokenizer->isCPP() && _settings->standards.CPP11 && tok->str() == "==") {
|
||||||
const Token* parent = tok->astParent();
|
const Token* parent = tok->astParent();
|
||||||
while (parent && parent->astParent()) {
|
while (parent && parent->astParent()) {
|
||||||
parent = parent->astParent();
|
parent = parent->astParent();
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#define GET_SYMBOL_DB(code) \
|
#define GET_SYMBOL_DB(code) \
|
||||||
errout.str(""); \
|
errout.str(""); \
|
||||||
Settings settings; \
|
|
||||||
Tokenizer tokenizer(&settings, this); \
|
Tokenizer tokenizer(&settings, this); \
|
||||||
std::istringstream istr(code); \
|
std::istringstream istr(code); \
|
||||||
tokenizer.tokenize(istr, "test.cpp"); \
|
tokenizer.tokenize(istr, "test.cpp"); \
|
||||||
|
@ -32,7 +31,6 @@
|
||||||
|
|
||||||
#define GET_SYMBOL_DB_C(code) \
|
#define GET_SYMBOL_DB_C(code) \
|
||||||
errout.str(""); \
|
errout.str(""); \
|
||||||
Settings settings; \
|
|
||||||
Tokenizer tokenizer(&settings, this); \
|
Tokenizer tokenizer(&settings, this); \
|
||||||
std::istringstream istr(code); \
|
std::istringstream istr(code); \
|
||||||
tokenizer.tokenize(istr, "test.c"); \
|
tokenizer.tokenize(istr, "test.c"); \
|
||||||
|
|
Loading…
Reference in New Issue