[PATCH] mtd: ubi: cdev: fix build warning for 64-bit
Wolfram Sang
w.sang at pengutronix.de
Mon Oct 22 15:48:59 EDT 2012
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 at 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
More information about the barebox
mailing list