Patchwork [U-Boot,1/6] YAFFS2: cmd_yaffs2.c - fix build warnings

login
register
mail settings
Submitter Wolfgang Denk
Date Sept. 8, 2011, 12:10 p.m.
Message ID <1315483822-25399-2-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/113893/
State Accepted
Commit d1f7a899ebda58f9fd09b2538b1a66e7529f7955
Headers show

Comments

Wolfgang Denk - Sept. 8, 2011, 12:10 p.m.
Fix these:
cmd_yaffs2.c: In function 'do_ywr':
cmd_yaffs2.c:69: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'ulong'
cmd_yaffs2.c:69: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'ulong'

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 common/cmd_yaffs2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Wolfgang Denk - Sept. 9, 2011, 10 p.m.
Dear Wolfgang Denk,

In message <1315483822-25399-2-git-send-email-wd@denx.de> you wrote:
> Fix these:
> cmd_yaffs2.c: In function 'do_ywr':
> cmd_yaffs2.c:69: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'ulong'
> cmd_yaffs2.c:69: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'ulong'
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  common/cmd_yaffs2.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/common/cmd_yaffs2.c b/common/cmd_yaffs2.c
index 7c01ea2..0e22d90 100644
--- a/common/cmd_yaffs2.c
+++ b/common/cmd_yaffs2.c
@@ -66,7 +66,7 @@  int do_ywr (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
     ulong value = simple_strtoul(argv[2], NULL, 16);
     ulong numValues = simple_strtoul(argv[3], NULL, 16);
 
-    printf ("Writing value (%x) %x times to %s... ", value, numValues, filename);
+    printf ("Writing value (%lx) %lx times to %s... ", value, numValues, filename);
 
     cmd_yaffs_write_file(filename,value,numValues);