use Token::link instead of findmatch to find ']'
This commit is contained in:
parent
00b62442b6
commit
3c82fbb73a
|
@ -1297,7 +1297,7 @@ static const Token *uninitvar_checkscope(const Token * const tokens, const Token
|
||||||
|
|
||||||
if (Token::simpleMatch(tok->next(), "["))
|
if (Token::simpleMatch(tok->next(), "["))
|
||||||
{
|
{
|
||||||
const Token *tok2 = Token::findmatch(tok, "]");
|
const Token *tok2 = tok->next()->link();
|
||||||
if (Token::simpleMatch(tok2 ? tok2->next() : 0, "="))
|
if (Token::simpleMatch(tok2 ? tok2->next() : 0, "="))
|
||||||
{
|
{
|
||||||
init = true;
|
init = true;
|
||||||
|
|
Loading…
Reference in New Issue