mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-28 03:20:15 +01:00
Fix clang -Weverything
This commit is contained in:
@@ -149,13 +149,13 @@ TEST(PrettyWriter, FileWriteStream) {
|
||||
|
||||
fp = fopen(filename, "rb");
|
||||
fseek(fp, 0, SEEK_END);
|
||||
size_t size = (size_t)ftell(fp);
|
||||
size_t size = static_cast<size_t>(ftell(fp));
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
char* json = (char*)malloc(size + 1);
|
||||
char* json = static_cast<char*>(malloc(size + 1));
|
||||
size_t readLength = fread(json, 1, size, fp);
|
||||
json[readLength] = '\0';
|
||||
fclose(fp);
|
||||
remove(filename);
|
||||
EXPECT_STREQ(kPrettyJson, json);
|
||||
free(json);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user