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);
|
*outLength = (size_t)ftell(fp);
|
||||||
fseek(fp, 0, SEEK_SET);
|
fseek(fp, 0, SEEK_SET);
|
||||||
char* buffer = (char*)malloc(*outLength + 1);
|
char* buffer = (char*)malloc(*outLength + 1);
|
||||||
fread(buffer, 1, *outLength, fp);
|
size_t readLength = fread(buffer, 1, *outLength, fp);
|
||||||
buffer[*outLength] = '\0';
|
buffer[readLength] = '\0';
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,8 @@ public:
|
|||||||
length_ = (size_t)ftell(fp);
|
length_ = (size_t)ftell(fp);
|
||||||
fseek(fp, 0, SEEK_SET);
|
fseek(fp, 0, SEEK_SET);
|
||||||
json_ = (char*)malloc(length_ + 1);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user