From: Simon Glass Date: Fri, 4 Nov 2011 06:42:36 +0000 (+0000) Subject: Fix warnings in cmd_nvedit.c X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=79afc88d2ccfd78fa8735719bb2648dac3c686b6;p=u-boot.git Fix warnings in cmd_nvedit.c This printf() string should be %ld now that uintptr_t is defined as long. Also fix a size_t error. Signed-off-by: Simon Glass Acked-by: Mike Frysinger --- diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 7194ade802..3beca5e40f 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -405,7 +405,7 @@ int setenv_addr(const char *varname, const void *addr) { char str[17]; - sprintf(str, "%x", (uintptr_t)addr); + sprintf(str, "%lx", (uintptr_t)addr); return setenv(varname, str); } @@ -871,7 +871,7 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv " - truncated\n", MAX_ENV_SIZE); } ++size; - printf("## Info: input data size = %zd = 0x%zX\n", size, size); + printf("## Info: input data size = %zu = 0x%zX\n", size, size); } if (chk) {