[PATCH v2] flash_otp_write: fix format string warning
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Mar 6 04:43:40 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>
---
Notes:
Changes since (implicit) v1, sent with
Message-Id: <1361378469-18631-1-git-send-email-u.kleine-koenig at pengutronix.de>:
- Use PRIdoff_t helper as suggested by Artem
flash_otp_write.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/flash_otp_write.c b/flash_otp_write.c
index d407ebb..f360a3e 100644
--- a/flash_otp_write.c
+++ b/flash_otp_write.c
@@ -15,6 +15,8 @@
#include <mtd/mtd-user.h>
+#include "common.h"
+
int main(int argc,char *argv[])
{
int fd, val, ret, size, wrote, len;
@@ -58,7 +60,8 @@ 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%" PRIdoff_t "\n",
+ argv[2], offset);
if (mtdInfo.type == MTD_NANDFLASH)
len = mtdInfo.writesize;
--
1.8.2.rc2
More information about the linux-mtd
mailing list