Skip to contentSkip to conversation

ext4: Fix printf() format string error

PATCH New Simon Glass 2 participants 2 messages Oct 23, 2012 – Oct 29, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: Fix printf() format string error

Fix the following error in the ext4 command:

cmd_ext4.c:110:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Werror=format]

---
 common/cmd_ext4.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_ext4.c +1 -1
index ca46561..75bb8c1 100644
@@ -107,7 +107,7 @@ int do_ext4_write(cmd_tbl_t *cmdtp, int flag, int argc,
 
 	/* mount the filesystem */
 	if (!ext4fs_mount(info.size)) {
-		printf("Bad ext4 partition %s %d:%lu\n", argv[1], dev, part);
+		printf("Bad ext4 partition %s %d:%d\n", argv[1], dev, part);
 		goto fail;
 	}
 
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 1/1 ext4: Fix printf() format string error

Quoted 6 lines · Simon Glass

Fix the following error in the ext4 command:

cmd_ext4.c:110:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Werror=format]

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121029/52a87241/attachment.pgp>