mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
tools: Fix compile error with glibc
This fixes the following compile error when compiling against recent
glibc:
------------
/tools/eeprom.c:223:9: error: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Werror=unused-result]
223 | fread(buf, 1, EEPROM_PART_SIZE, f);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
------------
Signed-off-by: Hauke Mehrtens <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
c32d6d849c
commit
021ded363d
+4
-1
@@ -209,6 +209,7 @@ static int
|
||||
mt76_eeprom_changes(void)
|
||||
{
|
||||
unsigned char *buf;
|
||||
size_t ret;
|
||||
FILE *f;
|
||||
int i;
|
||||
|
||||
@@ -220,7 +221,9 @@ mt76_eeprom_changes(void)
|
||||
|
||||
buf = malloc(EEPROM_PART_SIZE);
|
||||
fseek(f, mtd_offset, SEEK_SET);
|
||||
fread(buf, 1, EEPROM_PART_SIZE, f);
|
||||
ret = fread(buf, 1, EEPROM_PART_SIZE, f);
|
||||
if (ret != EEPROM_PART_SIZE)
|
||||
return EXIT_FAILURE;
|
||||
for (i = 0; i < EEPROM_PART_SIZE; i++) {
|
||||
if (buf[i] == eeprom_data[i])
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user