Skip to content
  • Stefan Roese's avatar
    tools/kwbimage: Fix compilation warning · 934a529f
    Stefan Roese authored
    
    
    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>
    934a529f