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
|
// standard or enum type: check if new initializes the allocated memory
|
||||||
if (var.typeStartToken()->isStandardType() || var.typeStartToken()->isEnumType()) {
|
if (var.typeStartToken()->isStandardType() || var.typeStartToken()->isEnumType()) {
|
||||||
// scalar new with initialization
|
// scalar new with initialization
|
||||||
if (Token::Match(tok->next(), " = new %type% ("))
|
if (Token::Match(tok->next(), "= new %type% ("))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// array new
|
// array new
|
||||||
if (Token::Match(tok->next(), " = new %type% [")) {
|
if (Token::Match(tok->next(), "= new %type% [")) {
|
||||||
const Token* tokClosingBracket=tok->tokAt(4)->link();
|
const Token* tokClosingBracket=tok->linkAt(4);
|
||||||
// array new with initialization
|
// array new with initialization
|
||||||
if (tokClosingBracket && Token::simpleMatch(tokClosingBracket->next(), "( )"))
|
if (tokClosingBracket && Token::simpleMatch(tokClosingBracket->next(), "( )"))
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue