From patchwork Wed Oct 5 07:23:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 117754 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 2A79FB6F94 for ; Wed, 5 Oct 2011 18:23:38 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A9DD928D76; Wed, 5 Oct 2011 09:23:36 +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 qzJCk6EBcUpI; Wed, 5 Oct 2011 09:23:36 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 587DE28DE0; Wed, 5 Oct 2011 09:23:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 883DC28DE0 for ; Wed, 5 Oct 2011 09:23:32 +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 yCxFltvFFxhm for ; Wed, 5 Oct 2011 09:23:31 +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 moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by theia.denx.de (Postfix) with ESMTP id 4BFA028D76 for ; Wed, 5 Oct 2011 09:23:30 +0200 (CEST) Received: from corscience.de (DSL01.212.114.252.242.ip-pool.NEFkom.net [212.114.252.242]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0M0N4b-1Qqw611vf3-00vBWR; Wed, 05 Oct 2011 09:23:28 +0200 Received: from azuregos.er.corscience.de (azuregos.2og.er.corscience.de [192.168.102.103]) by corscience.de (Postfix) with ESMTP id 36EC951FE3; Wed, 5 Oct 2011 09:23:27 +0200 (CEST) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: u-boot@lists.denx.de Date: Wed, 5 Oct 2011 09:23:26 +0200 Message-Id: <1317799406-14698-1-git-send-email-biessmann@corscience.de> X-Mailer: git-send-email 1.7.6.3 MIME-Version: 1.0 X-Provags-ID: V02:K0:Q6DGihk1xbtuy1cccYmRryMhL3hCV7ABFFiP30vPr66 rh/ZV+EJeEw9Y4ygljF6ixhxf1df0H0Ww1pkR3p/O4kd2XssBp cKsTwRRT97FS8t8avASXiExpJ0qoxe9xqbqufY5TtGHJ0cpEkF En98AsMn3qurYB6H6Zs4+/724rV8U9kdCvyfriL71B3s+VovF2 rQCjZl4yOwm9DUI7q0oCeXmiXXzOx+jN6wP0pJLhvv8da7AyJB coVK1Qqz3rKSQtkfsQGt4kBQ9DnMxdQaJF05u+R8ip0wTPA184 NvbXgCpjviiYidtglWZcpjgKag7kxPrJveVm0BctKzHyktLmii pTOXZlADKgCfRsFLDuuAhyVV2IcvMF7iZ44geBpWUw217vuBVA uK++7w8NAK0AQ== Cc: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Subject: [U-Boot] [PATCH] cmd_sf.c: fix compilation warning 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 building ./MAKEALL avr32 complains about ---8<--- Configuring for atngw100 board... cmd_sf.c: In function 'do_spi_flash': cmd_sf.c:164: warning: 'skipped' may be used uninitialized in this function cmd_sf.c:164: note: 'skipped' was declared here --->8--- This patch fixes it by defining skipped to maximum value. Signed-off-by: Andreas Bießmann --- common/cmd_sf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/cmd_sf.c b/common/cmd_sf.c index c8c547a..d84dea0 100644 --- a/common/cmd_sf.c +++ b/common/cmd_sf.c @@ -161,7 +161,7 @@ static int spi_flash_update(struct spi_flash *flash, u32 offset, char *cmp_buf; const char *end = buf + len; size_t todo; /* number of bytes to do in this pass */ - size_t skipped; /* statistics */ + size_t skipped = len; /* statistics */ cmp_buf = malloc(flash->sector_size); if (cmp_buf) {