]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
GCC4.6: Squash warning in cmd_nvedit.c
authorMarek Vasut <marek.vasut@gmail.com>
Mon, 26 Sep 2011 00:26:03 +0000 (02:26 +0200)
committerWolfgang Denk <wd@denx.de>
Sat, 1 Oct 2011 21:25:57 +0000 (23:25 +0200)
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>
common/cmd_nvedit.c

index e8b116df9bae4dc01bb9370e6a977c2a0f37c46d..101bc4906c0cf8df6bba51e94e7b9fd4f30b07a8 100644 (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';