From e1a21a8bb1ed58399a47f2ae5cab5910e3d73c05 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Sat, 8 Oct 2016 11:34:25 +0200 Subject: [PATCH] Fixed internal warnings --- lib/checkuninitvar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index 49fd55f34..6d5fc13d5 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -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;