From patchwork Wed Dec 3 13:07:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 417410 X-Patchwork-Delegate: trini@ti.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 359981400DD for ; Thu, 4 Dec 2014 00:07:56 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6EF094B86F; Wed, 3 Dec 2014 14:07:53 +0100 (CET) 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 V+zatT71z7Qu; Wed, 3 Dec 2014 14:07:53 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B3D254B861; Wed, 3 Dec 2014 14:07:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B8AD84B861 for ; Wed, 3 Dec 2014 14:07:48 +0100 (CET) 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 rdrTXxolRbrF for ; Wed, 3 Dec 2014 14:07:48 +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.sysam.it (sysam.it [5.39.81.93]) by theia.denx.de (Postfix) with ESMTP id 91A194B858 for ; Wed, 3 Dec 2014 14:07:45 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.sysam.it (Postfix) with ESMTP id DFE68418FB; Wed, 3 Dec 2014 14:08:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at sysam.it Received: from mail.sysam.it ([127.0.0.1]) by localhost (sysam.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7y4XSxXuYo2n; Wed, 3 Dec 2014 14:08:13 +0100 (CET) From: Angelo Dureghello To: u-boot@lists.denx.de Date: Wed, 3 Dec 2014 14:07:11 +0100 Message-Id: <1417612031-16552-1-git-send-email-angelo@sysam.it> X-Mailer: git-send-email 2.1.3 MIME-Version: 1.0 Cc: Angelo Dureghello Subject: [U-Boot] [PATCH] tools/kwbimage.c: fix build on m68k X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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 Compiler still complains about headersz possible uninitialized, even after last change (switch used). CROSS_COMPILE=/opt/toolchains/m68k/gcc-4.6.3-nolibc/m68k-linux/ bin/m68k-linux- ./MAKEALL -a m68k boards.cfg is up to date. Nothing to do. Building M52277EVB board... text data bss dec hex filename 118493 11756 4096 134345 20cc9 ./u-boot tools/kwbimage.c: In function ‘kwbimage_set_header’: tools/kwbimage.c:803:8: warning: ‘headersz’ may be used uninitialized in this function [-Wmaybe-uninitialized] memcpy(ptr, image, headersz); ^ Signed-off-by: Angelo Dureghello --- tools/kwbimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index c50f2e2..2c302e5 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -728,7 +728,7 @@ static void kwbimage_set_header(void *ptr, struct stat *sbuf, int ifd, FILE *fcfg; void *image = NULL; int version; - size_t headersz; + size_t headersz = 0; uint32_t checksum; int ret; int size;