[PATCH mtd-utils] flash_otp_write: fix format string warning
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Feb 20 11:41:09 EST 2013
This fixes
flash_otp_write.c: In function 'main':
flash_otp_write.c:61:2: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'off_t' [-Wformat]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
flash_otp_write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flash_otp_write.c b/flash_otp_write.c
index d407ebb..41cf1c5 100644
--- a/flash_otp_write.c
+++ b/flash_otp_write.c
@@ -58,7 +58,7 @@ int main(int argc,char *argv[])
return errno;
}
- printf("Writing OTP user data on %s at offset 0x%lx\n", argv[2], offset);
+ printf("Writing OTP user data on %s at offset 0x%lx\n", argv[2], (unsigned long)offset);
if (mtdInfo.type == MTD_NANDFLASH)
len = mtdInfo.writesize;
--
1.7.10.4
More information about the linux-mtd
mailing list