extra: fix unknown += assignments
commit36b582e34077158fa5678a568fc89d55ffbb9593
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 27 Feb 2014 09:49:54 +0000 (27 12:49 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 27 Feb 2014 09:49:54 +0000 (27 12:49 +0300)
tree9e85393214916a3ff05c822ce982aaa3e0ccaaec
parente55504a0964fac474394fb9d24614a2e63d5e278
extra: fix unknown += assignments

The if we have:

u64 x;
u32 y;

x += y;

Then we don't know the value of x, it could be 0-u64max.  In the original
code we said that it could go up to u32max.  The first part of this
function changes it to take the range from "x" instead of "y".

The next part of this patch says that we should be calculating the
absolute max instead of saying it was unknown anyway.  This mostly makes
the first change irrelevant.

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