[U-Boot] [PATCH v2] tools/kwbimage: Fix compilation warning
Wolfgang Denk
wd at denx.de
Tue Oct 28 11:38:25 CET 2014
Dear Stefan Roese,
In message <1414492344-19055-1-git-send-email-sr at denx.de> you 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 at 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)
Acked-By: Wolfgang Denk <wd at denx.de>
Thanks!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Es ist offensichtlich, dass das menschliche Gehirn wie ein Computer
funktioniert. Da es keine dummen Computer gibt, gibt es also auch
keine dummen Menschen. Nur ein paar Leute, die unter DOS laufen.
-- <unbekannt>
More information about the U-Boot
mailing list