flow: handle if (unlikely(1)) {
commit4f2f05cd3aebfb309e0089cea4ec8752dae90279
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 1 Dec 2014 12:47:07 +0000 (1 15:47 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 1 Dec 2014 12:47:07 +0000 (1 15:47 +0300)
tree83bdad784d25117904e8bb1a8184d56c174acd68
parent2942280e94f24659acdc49529c861ae392c65e8e
flow: handle if (unlikely(1)) {

There are some ASSERT() macros which are defined like this:

#define ASSERT(x) if (unlikely(!x)) die();

And they are called like this:

default:
printk("some error message");
ASSERT(0);

Smatch should recognize that after the code is unreachable after the
ASSERT(0);.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_data/kernel.unreachable.turn_off
smatch_helper.c
smatch_math.c