From: Joe Perches <joe@perches.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andy Whitcroft <apw@canonical.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] checkpatch: Add check for sscanf without return use
Date: Mon, 07 Oct 2013 17:29:00 -0700 [thread overview]
Message-ID: <1381192140.2081.235.camel@joe-AO722> (raw)
In-Reply-To: <CAErSpo75uQL5woms175LR4KCAmqT_SWpQcXGdbKccgVPdh6xhg@mail.gmail.com>
On Mon, 2013-10-07 at 18:10 -0600, Bjorn Helgaas wrote:
> On Mon, Oct 7, 2013 at 6:03 PM, Joe Perches <joe@perches.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@perches.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@perches.com>
---
V2: Use the $Compare variable instead of just == or !=
There are some tests that use < and >
next prev parent reply other threads:[~2013-10-08 0:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-07 23:45 Joe Perches
2013-10-07 23:56 ` Andrew Morton
2013-10-08 0:03 ` Joe Perches
2013-10-08 0:10 ` Bjorn Helgaas
2013-10-08 0:29 ` Joe Perches [this message]
2013-10-08 0:37 ` Geyslan Gregório Bem
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381192140.2081.235.camel@joe-AO722 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®