From patchwork Mon Sep 26 00:26:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 116336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 88DFAB6F7B for ; Mon, 26 Sep 2011 10:27:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A19202836D; Mon, 26 Sep 2011 02:26:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mAb+OSvNOoYp; Mon, 26 Sep 2011 02:26:47 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7CC9B282A2; Mon, 26 Sep 2011 02:26:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 23F8B281C6 for ; Mon, 26 Sep 2011 02:26:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C8-1WCVdS+YH for ; Mon, 26 Sep 2011 02:26:16 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTPS id 37AD22826A for ; Mon, 26 Sep 2011 02:26:13 +0200 (CEST) Received: by mail-fx0-f44.google.com with SMTP id 18so5006699fxd.3 for ; Sun, 25 Sep 2011 17:26:13 -0700 (PDT) Received: by 10.223.45.18 with SMTP id c18mr9526914faf.86.1316996773785; Sun, 25 Sep 2011 17:26:13 -0700 (PDT) Received: from mashiro.ms.mff.cuni.cz (eduroam32.ms.mff.cuni.cz. [195.113.21.32]) by mx.google.com with ESMTPS id w6sm18285342fah.0.2011.09.25.17.26.13 (version=SSLv3 cipher=OTHER); Sun, 25 Sep 2011 17:26:13 -0700 (PDT) From: Marek Vasut To: u-boot@lists.denx.de Date: Mon, 26 Sep 2011 02:26:03 +0200 Message-Id: <1316996766-14248-4-git-send-email-marek.vasut@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1316996766-14248-1-git-send-email-marek.vasut@gmail.com> References: <1316996766-14248-1-git-send-email-marek.vasut@gmail.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 4/7] GCC4.6: Squash warning in cmd_nvedit.c X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Acked-by: Mike Frysinger Acked-by: Mike Frysinger Acked-by: Simon Glass --- common/cmd_nvedit.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index e8b116d..101bc49 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';