Fixes two other warning about unused fread() return value
This commit is contained in:
parent
0815f0560a
commit
49b1a12799
@ -47,8 +47,8 @@ protected:
|
||||
*outLength = (size_t)ftell(fp);
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
char* buffer = (char*)malloc(*outLength + 1);
|
||||
fread(buffer, 1, *outLength, fp);
|
||||
buffer[*outLength] = '\0';
|
||||
size_t readLength = fread(buffer, 1, *outLength, fp);
|
||||
buffer[readLength] = '\0';
|
||||
fclose(fp);
|
||||
return buffer;
|
||||
}
|
||||
|
@ -20,8 +20,8 @@ public:
|
||||
length_ = (size_t)ftell(fp);
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user