mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mtd: ubi: cdev: fix build warning for 64-bit
@ 2012-10-22 19:48 Wolfram Sang
  2012-10-23  7:06 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2012-10-22 19:48 UTC (permalink / raw)
  To: barebox; +Cc: Wolfram Sang

Got this when compiling sandbox on a 64-bit system:

drivers/mtd/ubi/cdev.c: In function ‘ubi_volume_cdev_read’:
drivers/mtd/ubi/cdev.c:26:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat]

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 drivers/mtd/ubi/cdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index 93c3491..4bc4a99 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -23,7 +23,7 @@ static ssize_t ubi_volume_cdev_read(struct cdev *cdev, void *buf, size_t size,
 	loff_t offp = offset;
 	int usable_leb_size = vol->usable_leb_size;
 
-	printf("%s: %d @ 0x%08llx\n", __func__, size, offset);
+	printf("%s: %zd @ 0x%08llx\n", __func__, size, offset);
 
 	len = size > usable_leb_size ? usable_leb_size : size;
 
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: ubi: cdev: fix build warning for 64-bit
  2012-10-22 19:48 [PATCH] mtd: ubi: cdev: fix build warning for 64-bit Wolfram Sang
@ 2012-10-23  7:06 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-10-23  7:06 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: barebox

On Mon, Oct 22, 2012 at 09:48:59PM +0200, Wolfram Sang wrote:
> Got this when compiling sandbox on a 64-bit system:
> 
> drivers/mtd/ubi/cdev.c: In function ‘ubi_volume_cdev_read’:
> drivers/mtd/ubi/cdev.c:26:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat]
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>

Applied, thanks

Sascha

> ---
>  drivers/mtd/ubi/cdev.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
> index 93c3491..4bc4a99 100644
> --- a/drivers/mtd/ubi/cdev.c
> +++ b/drivers/mtd/ubi/cdev.c
> @@ -23,7 +23,7 @@ static ssize_t ubi_volume_cdev_read(struct cdev *cdev, void *buf, size_t size,
>  	loff_t offp = offset;
>  	int usable_leb_size = vol->usable_leb_size;
>  
> -	printf("%s: %d @ 0x%08llx\n", __func__, size, offset);
> +	printf("%s: %zd @ 0x%08llx\n", __func__, size, offset);
>  
>  	len = size > usable_leb_size ? usable_leb_size : size;
>  
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-23  7:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-22 19:48 [PATCH] mtd: ubi: cdev: fix build warning for 64-bit Wolfram Sang
2012-10-23  7:06 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox