Fixed internal warnings
This commit is contained in:
parent
9f1b70fa04
commit
e1a21a8bb1
|
@ -657,12 +657,12 @@ bool CheckUninitVar::checkScopeForVariable(const Token *tok, const Variable& var
|
|||
// standard or enum type: check if new initializes the allocated memory
|
||||
if (var.typeStartToken()->isStandardType() || var.typeStartToken()->isEnumType()) {
|
||||
// scalar new with initialization
|
||||
if (Token::Match(tok->next(), " = new %type% ("))
|
||||
if (Token::Match(tok->next(), "= new %type% ("))
|
||||
return true;
|
||||
|
||||
// array new
|
||||
if (Token::Match(tok->next(), " = new %type% [")) {
|
||||
const Token* tokClosingBracket=tok->tokAt(4)->link();
|
||||
if (Token::Match(tok->next(), "= new %type% [")) {
|
||||
const Token* tokClosingBracket=tok->linkAt(4);
|
||||
// array new with initialization
|
||||
if (tokClosingBracket && Token::simpleMatch(tokClosingBracket->next(), "( )"))
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue