lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 21 Apr 2014 10:25:18 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	mmarek@...e.cz, "H. Peter Anvin" <hpa@...or.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] Kbuild, lto: Avoid reported warning with strtoul

On 18 April 2014 10:05, Andi Kleen <andi@...stfloor.org> wrote:
> From: Andi Kleen <ak@...ux.intel.com>
>
> Apparently someone's C library declares strtoul with warn_unused_result.
> Cast to void to avoid the warning. Error handling is not useful here.

I just did a x86_64 compilation without a CROSS_COMPILE= option
(My .config also had a empty string) and so gcc must be used for it?

$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> Cc: Viresh Kumar <viresh.kumar@...aro.org>
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> ---
>  scripts/mod/modpost.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 0663556..b9cf439 100644
> --- 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]
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ