[U-Boot] [PATCH] fix: tools: kwbimage.c: Initialize headersz to suppress warning

Heiko Schocher hs at denx.de
Fri Nov 21 11:14:58 CET 2014


Hello Lukasz,

Am 21.11.2014 09:22, schrieb Lukasz Majewski:
> When building with my toolchain (4.8.2):
> CROSS_COMPILE=/home/lukma/work/ptxdist/toolchains/arm/OSELAS.Toolchain-2013.12.0/arm-v7a-linux-gnueabi/gcc-4.8.2-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/bin/arm-v7a-linux-gnueabi-
>
> I see following WARNING:
> 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);
>          ^
> This fix aims to suppress it.
>
> Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
> ---
>   tools/kwbimage.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

I did the same fix locally, but did not found time for posting it, so:

Acked-by: Heiko Schocher <hs at denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list