summaryrefslogtreecommitdiff
path: root/common/cmd_nvedit.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2011-09-26 02:26:03 +0200
committerWolfgang Denk <wd@denx.de>2011-10-01 23:25:57 +0200
commit7fcd9bbd6f0a69fb41b097cc8fd11d1ef21519e8 (patch)
treed6d645d77dfb15519c8f7384d0a5da243dc64b62 /common/cmd_nvedit.c
parent5b3901d9ae26ff5382f18912540b36c84783e5eb (diff)
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>
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r--common/cmd_nvedit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index e8b116df9ba..101bc4906c0 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -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';