]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_nvedit.c
cmd_nvedit: use explicit typecast for printf
[karo-tx-uboot.git] / common / cmd_nvedit.c
index f8c79763bf97a5b270257c0f24beda5e554397c7..6d8512aecbcf1d5f2ca176fe6425f06ea6e8d78f 100644 (file)
@@ -76,6 +76,8 @@ SPI_FLASH|MG_DISK|NVRAM|MMC|NOWHERE}
  */
 #define        MAX_ENV_SIZE    (1 << 20)       /* 1 MiB */
 
+ulong load_addr = CONFIG_SYS_LOAD_ADDR;        /* Default Load Address */
+
 /*
  * Table with supported baudrates (defined in config_xyz.h)
  */
@@ -657,7 +659,7 @@ static int do_env_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
                                errno);
                        return 1;
                }
-               sprintf(buf, "%zX", len);
+               sprintf(buf, "%zX", (size_t)len);
                setenv("filesize", buf);
 
                return 0;
@@ -683,7 +685,7 @@ static int do_env_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
                envp->flags = ACTIVE_FLAG;
 #endif
        }
-       sprintf(buf, "%zX", len + offsetof(env_t,data));
+       sprintf(buf, "%zX", (size_t)(len + offsetof(env_t,data)));
        setenv("filesize", buf);
 
        return 0;