mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
Fix 6accbf9
: Silence warnings about unused fread() result
This commit is contained in:
parent
0aa69693c6
commit
12ba56c5a3
@ -449,7 +449,8 @@ SQRESULT Squirrel::LoadFile(HSQUIRRELVM vm, const char *filename, SQBool printer
|
|||||||
}
|
}
|
||||||
unsigned short bom = 0;
|
unsigned short bom = 0;
|
||||||
if (size >= 2) {
|
if (size >= 2) {
|
||||||
fread(&bom, 1, sizeof(bom), file); // Inside tar, no point checking return value of fread
|
size_t sr = fread(&bom, 1, sizeof(bom), file);
|
||||||
|
(void)sr; // Inside tar, no point checking return value of fread
|
||||||
}
|
}
|
||||||
|
|
||||||
SQLEXREADFUNC func;
|
SQLEXREADFUNC func;
|
||||||
@ -487,8 +488,7 @@ SQRESULT Squirrel::LoadFile(HSQUIRRELVM vm, const char *filename, SQBool printer
|
|||||||
return sq_throwerror(vm, "I/O error");
|
return sq_throwerror(vm, "I/O error");
|
||||||
}
|
}
|
||||||
unsigned char uc;
|
unsigned char uc;
|
||||||
fread(&uc, 1, sizeof(uc), file);
|
if (fread(&uc, 1, sizeof(uc), file) != sizeof(uc) || uc != 0xBF) {
|
||||||
if (uc != 0xBF) {
|
|
||||||
FioFCloseFile(file);
|
FioFCloseFile(file);
|
||||||
return sq_throwerror(vm, "Unrecognized encoding");
|
return sq_throwerror(vm, "Unrecognized encoding");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user