comparison: introduce impossibly_high_comparison() [fix build error]
commitd159416b325cf7d866e549242eff96359c987fee
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 9 Apr 2018 10:50:00 +0000 (9 13:50 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 9 Apr 2018 10:50:00 +0000 (9 13:50 +0300)
tree6e6417434474fe937889a30ada742d0656bf5b14
parentcecc9335e0e3ad62e0b4db6488cfa3d8fe3dc3f9
comparison: introduce impossibly_high_comparison() [fix build error]

This fixes a build error.  My local tests are supposed to prevent build
errors, but they were buggy in this case so they ended up testing the wrong
code.  I've updated them.

The story here is that when we check for index overflows, one thing we do
is we say: "Let's assume we overflowed, does that mean we have to assume
other impossible conditions are met?"  This uses comparison data to see if
the comparisons are still possible.

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