mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	mmarek@suse.cz, "H. Peter Anvin" <hpa@zytor.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Kbuild, lto: Avoid reported warning with strtoul
Date: Mon, 21 Apr 2014 09:50:50 -0700	[thread overview]
Message-ID: <20140421165050.GB8874@tassilo.jf.intel.com> (raw)
In-Reply-To: <CAKohpond9DbNqWHLi9ZdL0BJRwZjeDZcar7KYuC2kAvWZp96-Q@mail.gmail.com>

On Mon, Apr 21, 2014 at 10:25:18AM +0530, Viresh Kumar wrote:
> > --- a/scripts/mod/modpost.c
> > +++ b/scripts/mod/modpost.c
> > @@ -1707,7 +1707,7 @@ static char *remove_dot(char *s)
> >         int n = strcspn(s, ".");
> >
> >         if (n > 0 && s[n] != 0) {
> > -               strtoul(s + n + 1, &end, 10);
> > +               (void)strtoul(s + n + 1, &end, 10);
> 
> I tried this earlier before reporting and it still had the same problem :(
> I tried it again just to cross check and still getting this:
> 
> scripts/mod/modpost.c: In function ‘remove_dot’:
> scripts/mod/modpost.c:1710:3: warning: ignoring return value of
> ‘strtoul’, declared with attribute warn_unused_result
> [-Wunused-result]

Hmm that's odd. I guess could assign it to a dummy variable or use
viro's variant.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

  reply	other threads:[~2014-04-21 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18  4:35 Andi Kleen
2014-04-18  4:49 ` Al Viro
2014-04-18 13:38   ` Andi Kleen
2014-04-21  4:55 ` Viresh Kumar
2014-04-21 16:50   ` Andi Kleen [this message]
2014-04-22  4:19     ` Viresh Kumar

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=20140421165050.GB8874@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=viresh.kumar@linaro.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®