Fix clang -Weverything

This commit is contained in:
Milo Yip
2015-12-18 18:34:04 +08:00
parent f36af30531
commit 74c8dcfd57
43 changed files with 504 additions and 342 deletions

View File

@@ -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);
}
}