Re: [PATCH v7] coccinelle: tests: unsigned value cannot be lesser than zero
From: Michal Marek
Date: Thu Jan 07 2016 - 09:37:23 EST
On Thu, Jan 07, 2016 at 12:35:34PM +0100, Julia Lawall wrote:
>
> On Thu, 7 Jan 2016, Andrzej Hajda wrote:
>
> > 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@xxxxxxxxxxx>
>
> Acked-by: Julia Lawall <julia.lawall@xxxxxxx>
Thanks to both of you, applied to kbuild.git#misc now.
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/