From 5b2e4891c413c2a217093cdb86e03af60a728eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 29 Oct 2016 18:29:05 +0200 Subject: [PATCH] Revert "Fix potential uninitialized variable in Tokenizer::simplifyTypedef" This reverts commit bed2f66302419e9e44f079362cb9531c984ed157. --- lib/tokenize.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 6390723d3..248fe2d94 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -1448,13 +1448,13 @@ void Tokenizer::simplifyTypedef() // Name is not available, and () should not be // inserted const bool castOperator = inOperator && Token::Match(tok2, "%type% ("); - Token *openParenthesis = nullptr; + Token *tok3; if (!castOperator) { tok2->insertToken("("); tok2 = tok2->next(); - openParenthesis = tok2; + tok3 = tok2; } const Token *tok4 = namespaceStart; @@ -1470,14 +1470,14 @@ void Tokenizer::simplifyTypedef() tok2->insertToken("*"); tok2 = tok2->next(); - if (openParenthesis) { + if (!castOperator) { // skip over name tok2 = tok2->next(); tok2->insertToken(")"); tok2 = tok2->next(); - Token::createMutualLinks(tok2, openParenthesis); + Token::createMutualLinks(tok2, tok3); } } } else if (typeOf) {