Fix CheckOther::functionVariableUsage, passing a variable to a function also means reading it.

This commit is contained in:
Nicolas Le Cam 2009-01-21 19:05:57 +00:00
parent 76cb2310af
commit afb3bf1011
1 changed files with 1 additions and 1 deletions

View File

@ -927,7 +927,7 @@ void CheckOther::functionVariableUsage()
varUsage[ tok->str()] |= USAGE_READ; varUsage[ tok->str()] |= USAGE_READ;
else if (Token::Match(tok, "[(,] %var% [,)]")) else if (Token::Match(tok, "[(,] %var% [,)]"))
varUsage[ tok->strAt(1)] |= USAGE_WRITE; varUsage[ tok->strAt(1)] |= (USAGE_WRITE | USAGE_READ);
else if (Token::Match(tok, "; %var% ;")) else if (Token::Match(tok, "; %var% ;"))
varUsage[ tok->strAt(1)] |= USAGE_READ; varUsage[ tok->strAt(1)] |= USAGE_READ;