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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 3 Apr 2013 11:06:56 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Zhang Yanfei <zhangyanfei@...fujitsu.com>
Cc:	kbuild test robot <fengguang.wu@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sysfs: fix compile warning in i386

On Wed, Apr 03, 2013 at 12:22:06PM +0800, Zhang Yanfei wrote:
> This patch fixes compile warning in i386:
> 
> drivers/base/cpu.c: In function 'show_crash_notes_size':
> drivers/base/cpu.c:142:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat]
> 
> Reported-by: kbuild test robot <fengguang.wu@...el.com>
> Signed-off-by: Zhang Yanfei <zhangyanfei@...fujitsu.com>
> ---
>  drivers/base/cpu.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
> index a55b590..ee38cc2 100644
> --- a/drivers/base/cpu.c
> +++ b/drivers/base/cpu.c
> @@ -138,8 +138,10 @@ static ssize_t show_crash_notes_size(struct device *dev,
>  				     char *buf)
>  {
>  	ssize_t rc;
> +	unsigned long size;
>  
> -	rc = sprintf(buf, "%lu\n", sizeof(note_buf_t));
> +	size = sizeof(note_buf_t);
> +	rc = sprintf(buf, "%lu\n", size);

No, use %z, like Arnd did in his patch, that makes it correct for all
arches.  I'll take his patch instead.

thanks,

greg k-h
--
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