Fixes a warning about unused fread() return value
This commit is contained in:
parent
e4188c8040
commit
0815f0560a
@ -15,8 +15,8 @@ static char* ReadFile(const char* filename, size_t& length) {
|
|||||||
length = (size_t)ftell(fp);
|
length = (size_t)ftell(fp);
|
||||||
fseek(fp, 0, SEEK_SET);
|
fseek(fp, 0, SEEK_SET);
|
||||||
char* json = (char*)malloc(length + 1);
|
char* json = (char*)malloc(length + 1);
|
||||||
fread(json, 1, length, fp);
|
size_t readLength = fread(json, 1, length, fp);
|
||||||
json[length] = '\0';
|
json[readLength] = '\0';
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user