extra/type: fix type of return PARAM_ADD/SET
commit08078e8b2231c5760b5a0f17ad1476e9517ccbd2
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Sep 2018 14:53:09 +0000 (14 17:53 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Sep 2018 14:53:09 +0000 (14 17:53 +0300)
tree2ee3f594d1a100d42741270e6188426a722d998b
parent5b3c30b59544df43d9ade5cca84b9c2aec1c53e6
extra/type: fix type of return PARAM_ADD/SET

Imagine we have a function "void frob(char *p);" and it sets *p to an
unknown signed char value.  Then we have a caller "frob(&u8_variabl);".
Before we would take -128-127 from the DB and try to put it into a u8,
but -128 is less than a u8 so it would get confused and set the result to
0-127.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch.h
smatch_extra.c
smatch_type.c