Commit 93e9371f authored by Łukasz Majewski's avatar Łukasz Majewski Committed by Tom Rini
Browse files

fix: tools: kwbimage.c: Initialize headersz to suppress warning

When building with my toolchain (4.8.2):

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: default avatarLukasz Majewski <>
Acked-by: Stefan Roese's avatarStefan Roese <>
Acked-by: Heiko Schocher's avatarHeiko Schocher <>
parent b8c70226
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment