lkml.org 
[lkml]   [2014]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Kbuild, lto: Avoid reported warning with strtoul
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
--
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/

\
 
 \ /
  Last update: 2014-04-21 19:01    [W:0.054 / U:1.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site