&(foo->bar) is not really a dereference.
commita8f11f7f8ef8981b3a4791c74bda5f46f2bcca97
authorDan Carpenter <error27@gmail.com>
Sat, 12 Dec 2009 11:19:54 +0000 (12 13:19 +0200)
committerDan Carpenter <error27@gmail.com>
Sat, 12 Dec 2009 11:19:54 +0000 (12 13:19 +0200)
treed684b0b7ea15d89b98cc6944fce522fe5dea5e69
parent3c503361bddd00d9cf4b37382495d5040d6c0760
&(foo->bar) is not really a dereference.

This is a bit hackish, but it should fix quite a few false positives.
Smatch used to print a warning for code like:
int x = &(foo->bar);
if (!foo)
return;
But that's not really a dereference and if foo is null it won't cause an
oops.

Also fix spelling.

Signed-off-by: Dan Carpenter <error27@gmail.com>
check_deref_check.c
smatch_flow.c
validation/sm_deref_check_deref.c [new file with mode: 0644]
validation/sm_null_deref.c