suppress unused result warning

This commit is contained in:
diamant3
2023-01-19 13:21:22 +08:00
parent c284bd5316
commit 4ad11ee364
5 changed files with 24 additions and 6 deletions

View File

@@ -195,7 +195,12 @@ unsigned char *load_file(const char *file, unsigned int *size)
break;
}
(void) fread(data, 1, *size, fp);
size_t result = fread(data, 1, *size, fp);
if (result < 0) {
fprintf(stderr, "Error, could not read the ELF\n");
fclose(fp);
break;
}
fclose(fp);
}
else