[U-Boot,2/6] YAFFS2: fs/yaffs2/yaffscfg.c - fix build warnings

Submitted by Wolfgang Denk on Sept. 8, 2011, 12:10 p.m.

Details

Message ID 1315483822-25399-3-git-send-email-wd@denx.de
State Accepted
Commit 6ac360c465d4916c2df291d6bbbe85d9bb7cc7be
Headers show

Commit Message

Wolfgang Denk Sept. 8, 2011, 12:10 p.m.
Fix these:
yaffscfg.c: In function 'cmd_yaffs_mread_file':
yaffscfg.c:316: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'char *'
yaffscfg.c: In function 'cmd_yaffs_ls': yaffscfg.c:371: warning: format '%7d' expects type 'int', but argument 3 has type 'off_t'

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 fs/yaffs2/yaffscfg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Wolfgang Denk Sept. 9, 2011, 10 p.m.
Dear Wolfgang Denk,

In message <1315483822-25399-3-git-send-email-wd@denx.de> you wrote:
> Fix these:
> yaffscfg.c: In function 'cmd_yaffs_mread_file':
> yaffscfg.c:316: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'char *'
> yaffscfg.c: In function 'cmd_yaffs_ls': yaffscfg.c:371: warning: format '%7d' expects type 'int', but argument 3 has type 'off_t'
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  fs/yaffs2/yaffscfg.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch hide | download patch | download mbox

diff --git a/fs/yaffs2/yaffscfg.c b/fs/yaffs2/yaffscfg.c
index 16e84a4..01399ea 100644
--- a/fs/yaffs2/yaffscfg.c
+++ b/fs/yaffs2/yaffscfg.c
@@ -313,7 +313,7 @@  void cmd_yaffs_mread_file(char *fn, char *addr)
 
 	yaffs_stat(fn,&s);
 
-	printf ("Copy %s to 0x%08x... ", fn, addr);
+	printf ("Copy %s to 0x%p... ", fn, addr);
 	h = yaffs_open(fn, O_RDWR,0);
 	if(h<0)
 	{
@@ -368,7 +368,7 @@  void cmd_yaffs_ls(const char *mountpt, int longlist)
 			{
 				sprintf(tempstr, "%s/%s", mountpt, de->d_name);
 				yaffs_stat(tempstr, &stat);
-				printf("%-25s\t%7d\n",de->d_name, stat.st_size);
+				printf("%-25s\t%7ld\n",de->d_name, stat.st_size);
 			}
 			else
 			{