db: filter pointer calls by function signatures
commit11ade184564f57838c79e0b654cc160eee8254c6
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 10 Feb 2017 13:21:01 +0000 (10 16:21 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 10 Feb 2017 13:21:01 +0000 (10 16:21 +0300)
tree1bddd24b812085ead0b1f66bfba31cf1f0acce05
parent53d0919450c811dd6595d39049aa5b568b35dba7
db: filter pointer calls by function signatures

The problem is that we would have code like:

foo->delete(bar);

And there are many things called delete.  Some of them take a struct
ethernet_thing and some take a struct power_management_releated_pointer.
Let's say one of them frees bar but the rest don't.  In the original code
we would complain if it re-used bar.

Now we look at what parameters we are supposed to be passing and if we
are passing ethernet_thing we can ignore the functions that don't match.

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