From patchwork Fri Mar 23 23:27:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 148490 X-Patchwork-Delegate: scottwood@freescale.com 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 3174DB6ED0 for ; Sat, 24 Mar 2012 10:27:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A794B28081; Sat, 24 Mar 2012 00:27:30 +0100 (CET) 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 ei85hIOFf+WW; Sat, 24 Mar 2012 00:27:30 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1F46128078; Sat, 24 Mar 2012 00:27:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 43AAA28078 for ; Sat, 24 Mar 2012 00:27:25 +0100 (CET) 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 9xYuidVc3VtI for ; Sat, 24 Mar 2012 00:27:23 +0100 (CET) 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-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by theia.denx.de (Postfix) with ESMTPS id C2BF328077 for ; Sat, 24 Mar 2012 00:27:22 +0100 (CET) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3VF1B11Cmyz4LDfC; Sat, 24 Mar 2012 00:27:21 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 3VF1B10dWcz4KK3f; Sat, 24 Mar 2012 00:27:21 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from smtp-auth.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id BqP4+pubaM4z; Sat, 24 Mar 2012 00:27:20 +0100 (CET) Received: from mashiro.lan (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA; Sat, 24 Mar 2012 00:27:20 +0100 (CET) From: Marek Vasut To: u-boot@lists.denx.de Date: Sat, 24 Mar 2012 00:27:18 +0100 Message-Id: <1332545238-877-1-git-send-email-marex@denx.de> X-Mailer: git-send-email 1.7.9.1 MIME-Version: 1.0 Cc: Marek Vasut , Scott Wood Subject: [U-Boot] [PATCH] cmd_nand: Fix possible uninited max_size variable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 GCC 4.7 error: cmd_nand.c: In function ‘arg_off_size’: cmd_nand.c:216:5: warning: ‘maxsize’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Marek Vasut Cc: Scott Wood --- common/cmd_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 035a6f6..b015d11 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -191,7 +191,7 @@ static int arg_off_size(int argc, char *const argv[], int *idx, loff_t *off, loff_t *size) { int ret; - loff_t maxsize; + loff_t maxsize = 0; if (argc == 0) { *off = 0;