diff options
author | Daniel Eklöf <daniel@ekloef.se> | 2022-10-05 20:46:14 +0200 |
---|---|---|
committer | Daniel Eklöf <daniel@ekloef.se> | 2022-10-05 20:46:14 +0200 |
commit | 43d9d386de9c9c661c5ee2a256ad5d8e8f316e29 (patch) | |
tree | c254ed42a1cd06e0dc9226c9de9591b984da148f /webp.c | |
parent | 176e90a1b62bdb776aff97c566dcdda9602a1483 (diff) | |
download | wbg-43d9d386de9c9c661c5ee2a256ad5d8e8f316e29.tar.gz |
webp: don’t ignore fread() errors
Fixes:
../webp.c:38:5: error: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
Diffstat (limited to 'webp.c')
-rw-r--r-- | webp.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -35,8 +35,7 @@ webp_load(FILE *fp, const char *path) } clearerr(fp); - fread(file_data, image_size, 1, fp); - if (ferror(fp)) { + if (fread(file_data, image_size, 1, fp) != image_size && ferror(fp)) { LOG_ERRNO("%s: failed to read", path); goto out; } |