Patchwork [U-Boot] UBIFS: fix warning: format '%lX' expects type 'long unsigned int'

login
register
mail settings
Submitter Wolfgang Denk
Date Sept. 9, 2011, 10:43 p.m.
Message ID <1315608216-7425-1-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/114144/
State Accepted
Commit aaf6935b223ccf746d1504661d2c40bf73698d3b
Headers show

Comments

Wolfgang Denk - Sept. 9, 2011, 10:43 p.m.
Commit 46d7274 "UBIFS: Change ubifsload to set the filesize variable"
introduced the follwing compiler warning:

ubifs.c: In function 'ubifs_load':
ubifs.c:742: warning: format '%lX' expects type 'long unsigned int', but argument 3 has type 'u32'

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Bastian Ruppert <Bastian.Ruppert@Sewerin.de>
---
 fs/ubifs/ubifs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Wolfgang Denk - Sept. 10, 2011, 8:40 p.m.
Dear Wolfgang Denk,

In message <1315608216-7425-1-git-send-email-wd@denx.de> you wrote:
> Commit 46d7274 "UBIFS: Change ubifsload to set the filesize variable"
> introduced the follwing compiler warning:
> 
> ubifs.c: In function 'ubifs_load':
> ubifs.c:742: warning: format '%lX' expects type 'long unsigned int', but argument 3 has type 'u32'
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Bastian Ruppert <Bastian.Ruppert@Sewerin.de>
> ---
>  fs/ubifs/ubifs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 2e6313a..604eb8f 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -739,7 +739,7 @@  int ubifs_load(char *filename, u32 addr, u32 size)
 	if (err)
 		printf("Error reading file '%s'\n", filename);
 	else {
-	        sprintf(buf, "%lX", size);
+	        sprintf(buf, "%X", size);
 		setenv("filesize", buf);
 		printf("Done\n");
 	}