From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] tools/kwbimage: Fix compilation warning
Date: Thu, 30 Oct 2014 23:16:22 +0100 [thread overview]
Message-ID: <20141030231622.66074ace@crub> (raw)
In-Reply-To: <1414492344-19055-1-git-send-email-sr@denx.de>
On Tue, 28 Oct 2014 11:32:24 +0100
Stefan Roese <sr@denx.de> wrote:
> This patch fixes a compilation warning of kwbimage.c:
>
> tools/kwbimage.c: In function ?kwbimage_set_header?:
> tools/kwbimage.c:784:8: warning: ?headersz? may be used uninitialized in this function [-Wmaybe-uninitialized]
> memcpy(ptr, image, headersz);
> ^
> Instead of using multiple if statements, use a switch statement with
> a default entry. And return with error if an unsupported version
> is configured in the cfg file.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
> v2:
> - Change error message so that it really makes sense (unsupported
> version instead of no version)
> - Change this also in the commit text
> - Small change (s/is/if)
>
> tools/kwbimage.c | 23 +++++++++++++++++------
> 1 file changed, 17 insertions(+), 6 deletions(-)
Applied to u-boot-staging. Thanks!
Anatolij
prev parent reply other threads:[~2014-10-30 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 10:32 [U-Boot] [PATCH v2] tools/kwbimage: Fix compilation warning Stefan Roese
2014-10-28 10:38 ` Wolfgang Denk
2014-11-13 22:51 ` York Sun
2014-10-30 22:16 ` Anatolij Gustschin [this message]
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=20141030231622.66074ace@crub \
--to=agust@denx.de \
--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