linux-hardened/scripts/coccinelle
Andrzej Hajda 3f984cb399 coccinelle: tests: unsigned value cannot be lesser than zero
Unsigned expressions cannot be lesser than zero. Presence of comparisons
'unsigned (<|<=|>|>=) 0' often indicates a bug, usually wrong type of variable.
The patch beside finding such comparisons tries to eliminate false positives,
mainly by bypassing range checks.

gcc can detect such comparisons also using -Wtype-limits switch, but it warns
also in correct cases, making too much noise.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-01-12 17:47:47 +01:00
..
api Merge branch 'akpm' (patches from Andrew) 2015-09-08 17:52:23 -07:00
free coccinelle: ifnullfree: handle various destroy functions 2015-10-26 22:41:18 +01:00
iterators cocinelle: iterators: semantic patch to delete unneeded of_node_put 2015-10-26 22:39:11 +01:00
locks Coccinelle: Update the options used to the new option scheme 2013-07-03 22:58:13 +02:00
misc coccinelle: Improve checking for missing NULL terminators 2015-10-26 22:44:51 +01:00
null scripts/coccinelle: fix typos 2015-10-26 22:26:23 +01:00
tests coccinelle: tests: unsigned value cannot be lesser than zero 2016-01-12 17:47:47 +01:00