modification_hooks: set a variable as modified when it goes out of scope
commit8eb720f48d616cfbf07733ccedfb39d285f4ca34
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Mar 2015 11:16:03 +0000 (20 14:16 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Mar 2015 11:16:03 +0000 (20 14:16 +0300)
tree84601fb353dde532b7fcafa4775a3725a3cbe8b2
parentafccb5d20c34ee98ad3eb79ca3b45d3394f3a65d
modification_hooks:  set a variable as modified when it goes out of scope

This affects smatch_stored_condition.c because that stores the condition
without a sym pointer.  So if you have two "err" variables in different
scopes and we end the scope with "err == 0" then the next time we see
"if (err) " it complains that we already have checked this condition.

Now we clear all the stored "err" conditions at the end of "err's" scope.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_modification_hooks.c