From afb3bf1011b206f31d04cbb22322dab6edc0c1e4 Mon Sep 17 00:00:00 2001 From: Nicolas Le Cam Date: Wed, 21 Jan 2009 19:05:57 +0000 Subject: [PATCH] Fix CheckOther::functionVariableUsage, passing a variable to a function also means reading it. --- src/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checkother.cpp b/src/checkother.cpp index 2aaab36ad..f3f4e404a 100644 --- a/src/checkother.cpp +++ b/src/checkother.cpp @@ -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;