Fix CheckOther::functionVariableUsage, passing a variable to a function also means reading it.
This commit is contained in:
parent
76cb2310af
commit
afb3bf1011
|
@ -927,7 +927,7 @@ void CheckOther::functionVariableUsage()
|
|||
varUsage[ tok->str()] |= USAGE_READ;
|
||||
|
||||
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% ;"))
|
||||
varUsage[ tok->strAt(1)] |= USAGE_READ;
|
||||
|
|
Loading…
Reference in New Issue