[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1381192140.2081.235.camel@joe-AO722>
Date: Mon, 07 Oct 2013 17:29:00 -0700
From: Joe Perches <joe@...ches.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andy Whitcroft <apw@...onical.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] checkpatch: Add check for sscanf without return use
On Mon, 2013-10-07 at 18:10 -0600, Bjorn Helgaas wrote:
> On Mon, Oct 7, 2013 at 6:03 PM, Joe Perches <joe@...ches.com> wrote:
> > On Mon, 2013-10-07 at 16:56 -0700, Andrew Morton wrote:
> >> On Mon, 07 Oct 2013 16:45:23 -0700 Joe Perches <joe@...ches.com> wrote:
> >>
> >> > Naked use sscanf can be troublesome.
> >>
> >> It would be helpful to expand on "troublesome"?
> >
> > Dunno, you either know or the couple of paragraphs
> > it takes to explain with examples won't really be
> > too helpful in a commit log.
>
> It would be helpful to me, since I don't write code with sscanf every
> day. A URL to an LKML description or something would be enough if the
> commit log size is the concern.
I sent a V2 patch to Andrew and mm using this commit log:
Naked use sscanf can be troublesome because the pointed
to variables may not have been set.
Add a warning when the sscanf return value is not used.
Signed-off-by: Joe Perches <joe@...ches.com>
---
V2: Use the $Compare variable instead of just == or !=
There are some tests that use < and >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists