1
0
Fork 0
Commit Graph

1 Commits (df06b37ffe5a442503b7095b77b0a970df515459)

Author SHA1 Message Date
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