mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-09 11:09:32 +01:00
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);
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
char* json = (char*)malloc(length + 1);
|
||||
fread(json, 1, length, fp);
|
||||
json[length] = '\0';
|
||||
size_t readLength = fread(json, 1, length, fp);
|
||||
json[readLength] = '\0';
|
||||
fclose(fp);
|
||||
return json;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user