Fix compiler warning. run astyle
This commit is contained in:
parent
ad8749c0bd
commit
85c02df56c
|
@ -851,7 +851,7 @@ void CheckStl::if_find()
|
||||||
else if (Token::Match(decl, "%type% >")) {
|
else if (Token::Match(decl, "%type% >")) {
|
||||||
decl = decl->tokAt(2);
|
decl = decl->tokAt(2);
|
||||||
if (warning && (Token::Match(decl, "* &| %varid%", varid) ||
|
if (warning && (Token::Match(decl, "* &| %varid%", varid) ||
|
||||||
Token::Match(decl, "&| %varid% [ ]| %any% ]| ", varid)))
|
Token::Match(decl, "&| %varid% [ ]| %any% ]| ", varid)))
|
||||||
if_findError(tok, false);
|
if_findError(tok, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -862,7 +862,7 @@ void CheckStl::if_find()
|
||||||
else if (performance && var->isStlStringType()) {
|
else if (performance && var->isStlStringType()) {
|
||||||
decl = decl->next();
|
decl = decl->next();
|
||||||
if (Token::Match(decl, "* &| %varid%", varid) ||
|
if (Token::Match(decl, "* &| %varid%", varid) ||
|
||||||
Token::Match(decl, "&| %varid% [ ]| %any% ]| ", varid))
|
Token::Match(decl, "&| %varid% [ ]| %any% ]| ", varid))
|
||||||
if_findError(tok, true);
|
if_findError(tok, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2358,6 +2358,9 @@ private:
|
||||||
"void CheckMemoryLeakInFunction::getcode(const Token *tok ) {\n"
|
"void CheckMemoryLeakInFunction::getcode(const Token *tok ) {\n"
|
||||||
" addtoken(&rettail, tok);\n"
|
" addtoken(&rettail, tok);\n"
|
||||||
"}");
|
"}");
|
||||||
|
const Token *f = Token::findsimplematch(tokenizer.tokens(), "void addtoken ( Token * *");
|
||||||
|
ASSERT_EQUALS(true, db && f);
|
||||||
|
ASSERT_EQUALS(true, db && f && f->function());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue