Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303621

Re: [PATCH v7] coccinelle: tests: unsigned value cannot be lesser than zero

From Michal Marek <mmarek@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCH v7] coccinelle: tests: unsigned value cannot be lesser than zero
Date 2016-01-07 15:40 +0100
Message-ID <qOjTl-SP-29@gated-at.bofh.it> (permalink)
References <qNACT-3VY-31@gated-at.bofh.it> <qOfd0-6ef-19@gated-at.bofh.it> <qOh57-7sH-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@samsung.com>
> 
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v6] coccinelle: tests: unsigned value cannot be lesser than zero Andrzej Hajda <a.hajda@samsung.com> - 2016-01-04 08:50 +0100
  Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser  than zero "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-05 14:00 +0100
    Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser  than zero Julia Lawall <julia.lawall@lip6.fr> - 2016-01-05 14:10 +0100
      Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser  than zero "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-05 15:20 +0100
        Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser  than zero "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-05 17:50 +0100
    Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than  zero Andrzej Hajda <a.hajda@samsung.com> - 2016-01-05 15:00 +0100
      Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser  than zero "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-05 15:20 +0100
  Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser  than zero Julia Lawall <julia.lawall@lip6.fr> - 2016-01-05 15:20 +0100
    Re: [PATCH v6] coccinelle: tests: unsigned value cannot be lesser than  zero Andrzej Hajda <a.hajda@samsung.com> - 2016-01-05 15:30 +0100
    [PATCH v7] coccinelle: tests: unsigned value cannot be lesser than zero Andrzej Hajda <a.hajda@samsung.com> - 2016-01-07 10:40 +0100
      Re: [PATCH v7] coccinelle: tests: unsigned value cannot be lesser  than zero Julia Lawall <julia.lawall@lip6.fr> - 2016-01-07 12:40 +0100
        Re: [PATCH v7] coccinelle: tests: unsigned value cannot be lesser  than zero Michal Marek <mmarek@suse.com> - 2016-01-07 15:40 +0100

csiph-web