*new* check_cast_assign.c: check casting a smaller type to larger
commit55d8557167a8da241e3c3b6b9bafb50aabfd08e1
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Dec 2013 10:40:46 +0000 (17 13:40 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Dec 2013 10:40:46 +0000 (17 13:40 +0300)
treefabcb0976e35a9d3ec18354cfaea2c740be3efa4
parentb15f7ae0b638e4ce0ab22ed7a5948a0e77b81991
*new* check_cast_assign.c: check casting a smaller type to larger

This complains for code like:

int x;

*(long long *)&x = 1;

Except the bad thing is that you need to have --spammy enabled for it to
calculate the buffer size correctly in that line...  Hopefully, I can fix
up smatch_buf_size.c so this works by default.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_cast_assign.c [new file with mode: 0644]
check_list.h