extra, function_hooks: fix handling of casted function calls
If we have code like this:
unsigned int frob();
...
int x = (unsigned char)frob();
There were several problems with this. When we're changing the string
from the database "0-u32max" to a range_list then we need to do that with
a unsigned int type. The current code was using unsigned char. After we
have the unsigned int then we can cast it to unsigned char.
Also in smatch_extra.c it was looking at the cast operation and not
seeing that it was a function call. It meant that we set the value then
set it again properly later. It's doesn't cause a bug, but it's not
pretty.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>