提交 7fcd9bbd 编写于 作者: M Marek Vasut 提交者: Wolfgang Denk

GCC4.6: Squash warning in cmd_nvedit.c

cmd_nvedit.c: In function ‘do_env_edit’:
cmd_nvedit.c:463:6: warning: variable ‘len’ set but not used
[-Wunused-but-set-variable]
Signed-off-by: NMarek Vasut <marek.vasut@gmail.com>
上级 5b3901d9
......@@ -460,7 +460,6 @@ int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char buffer[CONFIG_SYS_CBSIZE];
char *init_val;
int len;
if (argc < 2)
return cmd_usage(cmdtp);
......@@ -468,7 +467,7 @@ int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* Set read buffer to initial value or empty sting */
init_val = getenv(argv[1]);
if (init_val)
len = sprintf(buffer, "%s", init_val);
sprintf(buffer, "%s", init_val);
else
buffer[0] = '\0';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册