fix internal warning; was

[lib/checkstring.cpp:43]: (warning) Found simple pattern inside Token::Match() call: "] ="
This commit is contained in:
Matthias Krüger 2015-05-03 10:59:58 +02:00
parent 666377da1c
commit 6b80e61934
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ void CheckString::stringLiteralWrite()
const Token *str = tok->getValueTokenMinStrSize();
if (!str)
continue;
if (Token::Match(tok, "%var% [") && Token::Match(tok->linkAt(1), "] ="))
if (Token::Match(tok, "%var% [") && Token::simpleMatch(tok->linkAt(1), "] ="))
stringLiteralWriteError(tok);
else if (Token::Match(tok->previous(), "* %var% ="))
stringLiteralWriteError(tok);