diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-04-09 09:21:25 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2021-04-09 10:46:15 +0200 |
commit | 052a30d65e90ac9b3359f4a23aa3024d102c178c (patch) | |
tree | d859432c8f94883220be2d48e0d8dc84f10c620d /tools/firmware-utils/src/mkcasfw.c | |
parent | a2f66229450dc2f7647c19ac83f3948e809406c2 (diff) | |
download | upstream-052a30d65e90ac9b3359f4a23aa3024d102c178c.tar.gz upstream-052a30d65e90ac9b3359f4a23aa3024d102c178c.tar.bz2 upstream-052a30d65e90ac9b3359f4a23aa3024d102c178c.zip |
firmware-utils: fix -Wmaybe-uninitialized warnings
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'tools/firmware-utils/src/mkcasfw.c')
-rw-r--r-- | tools/firmware-utils/src/mkcasfw.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/firmware-utils/src/mkcasfw.c b/tools/firmware-utils/src/mkcasfw.c index eb92c8e3ff..904000c78d 100644 --- a/tools/firmware-utils/src/mkcasfw.c +++ b/tools/firmware-utils/src/mkcasfw.c @@ -554,6 +554,10 @@ csum_get(struct csum_state *css) break; case CSUM_TYPE_32: ret = csum32_get(css); + break; + default: + ERR("invalid checksum size\n"); + return 0; } return ret; @@ -755,6 +759,9 @@ write_out_header(FILE *outfile) res = write_out_data(outfile, (uint8_t *)&tmp.nfs, sizeof(tmp.nfs), NULL); break; + default: + ERR("invalid header type\n"); + return -EINVAL; } return res; |