From ae0db780f0d51cd4350d6236e105f2b430d6ec6a Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 26 Sep 2011 02:26:03 +0200 Subject: [PATCH] GCC4.6: Squash warning in cmd_nvedit.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 [sw0312.kim: cherry-pick from mainline commit 7fcd9bbd6f0a6 to fix build warning] Signed-off-by: Seung-Woo Kim Change-Id: I241ecf6c472b6fc43ccc2254abaa38434767586c --- common/cmd_nvedit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index dcc93c1..d92b94d 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -424,7 +424,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); @@ -432,7 +431,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'; -- 2.7.4