From 3c82fbb73ae5a13d8ca7151d46ecdef495568edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 3 Nov 2009 22:48:41 +0100 Subject: [PATCH] use Token::link instead of findmatch to find ']' --- lib/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index a0a13860b..4135e37a1 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1297,7 +1297,7 @@ static const Token *uninitvar_checkscope(const Token * const tokens, const Token if (Token::simpleMatch(tok->next(), "[")) { - const Token *tok2 = Token::findmatch(tok, "]"); + const Token *tok2 = tok->next()->link(); if (Token::simpleMatch(tok2 ? tok2->next() : 0, "=")) { init = true;