function_hooks: remove impossible return states
commit1f6b1b1282b86d7b271ed1f9cad94c7f51f77b43
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 Dec 2014 08:07:19 +0000 (8 11:07 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 Dec 2014 08:07:19 +0000 (8 11:07 +0300)
treebcf0a8145ec305342aa6b2b097b9b35d749eca47
parentaad3ad9670280bda543d662e497ffc9138b17e8d
function_hooks: remove impossible return states

Say you have a function:

void frob(int a, int *b)
{
switch (a) {
case 1:
*b = 100;
case 2:
*b = 200;
}
}

Then you have a caller:  "frob(1, &val);" then we know that *b isn't 200
so we can discard that case.

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