]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/cmd_nvedit.c
cmd_nvedit: use explicit typecast for printf
[people/ms/u-boot.git] / common / cmd_nvedit.c
index fb69c242f1c890c5febd75a92afa9b304fe42585..6d8512aecbcf1d5f2ca176fe6425f06ea6e8d78f 100644 (file)
@@ -659,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;
@@ -685,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;