Skip to content
Snippets Groups Projects
Commit 934a529f authored by Stefan Roese's avatar Stefan Roese Committed by Anatolij Gustschin
Browse files

tools/kwbimage: Fix compilation warning


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: default avatarStefan Roese <sr@denx.de>
Acked-By: default avatarWolfgang Denk <wd@denx.de>
parent e5f1a586
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment