minor code cleanup
This commit is contained in:
parent
791c633d18
commit
79f6793076
|
@ -1234,13 +1234,12 @@ void CheckBufferOverrun::checkGlobalAndLocalVariable()
|
||||||
|
|
||||||
for (const Token *tok = scope->classStart; tok != scope->classEnd; tok = tok->next()) {
|
for (const Token *tok = scope->classStart; tok != scope->classEnd; tok = tok->next()) {
|
||||||
// if the previous token exists, it must be either a variable name or "[;{}]"
|
// if the previous token exists, it must be either a variable name or "[;{}]"
|
||||||
if (tok->previous() && !tok->previous()->isName() && !Token::Match(tok->previous(), "[;{}]"))
|
if (tok->previous() && !Token::Match(tok->previous(), "%name%|;|{|}"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// size : Max array index
|
// size : Max array index
|
||||||
MathLib::bigint size = 0;
|
MathLib::bigint size = 0;
|
||||||
|
|
||||||
|
|
||||||
// nextTok : used to skip to next statement.
|
// nextTok : used to skip to next statement.
|
||||||
const Token * nextTok = tok;
|
const Token * nextTok = tok;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue