Fixed Ticket #202: Return of the address of an auto-variable

This commit is contained in:
Gianluca Scacco 2009-03-24 21:53:46 +01:00
parent afcaa30b51
commit a66cf8b20f
1 changed files with 3 additions and 3 deletions

View File

@ -206,7 +206,7 @@ void CheckAutoVariables::autoVariables()
"autoVariables",
"Wrong assignement of an auto-variable to an effective parameter of a function");
}
else if (bindent > 0 && Token::Match(tok, "return & %var%")) //Critical return
else if (bindent > 0 && Token::Match(tok, "return & %var% ;")) //Critical return
{
if (isAutoVar(tok->tokAt(2)))
reportError(tok,