diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-04-09 07:38:46 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2021-04-09 10:46:15 +0200 |
commit | 7c01e2bac1c2df1e10658b81e903fbd687c1a56b (patch) | |
tree | a39b400e7e2a6f26ef27ecd1368618e1aee4a979 /tools/firmware-utils/src/trx2edips.c | |
parent | e65b633a5b86928a00c5fe3b691144b351fe32cd (diff) | |
download | upstream-7c01e2bac1c2df1e10658b81e903fbd687c1a56b.tar.gz upstream-7c01e2bac1c2df1e10658b81e903fbd687c1a56b.tar.bz2 upstream-7c01e2bac1c2df1e10658b81e903fbd687c1a56b.zip |
firmware-utils: fix unused variable warnings
This fixes warnings from the:
1. -Wunused-variable
2. -Wunused-but-set-variable
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'tools/firmware-utils/src/trx2edips.c')
-rw-r--r-- | tools/firmware-utils/src/trx2edips.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/firmware-utils/src/trx2edips.c b/tools/firmware-utils/src/trx2edips.c index f8d068d502..14c4eb70ba 100644 --- a/tools/firmware-utils/src/trx2edips.c +++ b/tools/firmware-utils/src/trx2edips.c @@ -140,6 +140,10 @@ int main(int argc, char *argv[]) rewind(fpIn); /* read the whole file*/ res = fread(buf, 1, length, fpIn); + if (res != length) { + fprintf(stderr, "Unable to fread from input file\n"); + return EXIT_FAILURE; + } p = (struct trx_header *)buf; if (LOAD32_LE(p->magic) != TRX_MAGIC) { |