projects
/
openwrt
/
staging
/
ynezz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e8faa4
)
firmware-utils: mkmerakifw-old: fix compiler warnings/errors
author
Petr Štetiar
<ynezz@true.cz>
Mon, 22 Jul 2019 09:57:49 +0000
(11:57 +0200)
committer
Petr Štetiar
<ynezz@true.cz>
Tue, 23 Jul 2019 20:07:23 +0000
(22:07 +0200)
mkmerakifw-old.c:257:2: error: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Werror=unused-result]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
tools/firmware-utils/src/mkmerakifw-old.c
patch
|
blob
|
history
diff --git
a/tools/firmware-utils/src/mkmerakifw-old.c
b/tools/firmware-utils/src/mkmerakifw-old.c
index 05317c2a5b4eb526e1236627b8a052eb84f3fbba..e7e4fcf8dc47fb8c87d731d7d66d13d2603d7e98 100644
(file)
--- a/
tools/firmware-utils/src/mkmerakifw-old.c
+++ b/
tools/firmware-utils/src/mkmerakifw-old.c
@@
-254,7
+254,11
@@
static int meraki_build_hdr(const struct board_info *board, const size_t klen,
/* Load kernel */
kernel = buf + HDR_LENGTH;
- fread(kernel, klen, 1, in);
+ size_t r = fread(kernel, klen, 1, in);
+ if (r != 1) {
+ ERRS("unable to load kernel: %s\n");
+ return EXIT_FAILURE;
+ }
/* Write magic values and filler */
writel(buf, HDR_OFF_MAGIC1, board->magic);