Commit 49b1a127 authored by Milo Yip's avatar Milo Yip

Fixes two other warning about unused fread() return value

parent 0815f056
...@@ -47,8 +47,8 @@ protected: ...@@ -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: ...@@ -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);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment