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: Marek Vasut <marek.vasut@gmail.com>
This commit is contained in:
Marek Vasut 2011-09-26 02:26:03 +02:00 committed by Wolfgang Denk
parent 5b3901d9ae
commit 7fcd9bbd6f
1 changed files with 1 additions and 2 deletions

View File

@ -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';