提交 8c3aff52 编写于 作者: A Andreas Bießmann 提交者: Wolfgang Denk

cmd_nvedit: use explicit typecast for printf

This patch fixes warnings in MAKEALL for avr32:

---8<---
cmd_nvedit.c: In function 'do_env_export':
cmd_nvedit.c:663: warning: format '%zX' expects type 'size_t', but argument 3 has type 'ssize_t'
--->8---
Signed-off-by: NAndreas Biemann <biessmann@corscience.de>
上级 8ae86b76
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册