public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Angelo Dureghello <angelo@sysam.it>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tools/kwbimage.c: fix build on m68k
Date: Wed,  3 Dec 2014 14:07:11 +0100	[thread overview]
Message-ID: <1417612031-16552-1-git-send-email-angelo@sysam.it> (raw)

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 <angelo@sysam.it>
---
 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;
-- 
2.1.1

             reply	other threads:[~2014-12-03 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03 13:07 Angelo Dureghello [this message]
2014-12-03 13:24 ` [U-Boot] [PATCH] tools/kwbimage.c: fix build on m68k Lukasz Majewski
2014-12-03 14:45   ` Angelo Dureghello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417612031-16552-1-git-send-email-angelo@sysam.it \
    --to=angelo@sysam.it \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox