mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-27 19:10:24 +01:00
Fixed a lots of vc2008/vs2010 and gcc3/4 warnings with the maximum warning level.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@67 c5894555-1306-4e8d-425f-1f6f381ee07c
This commit is contained in:
@@ -30,11 +30,12 @@ TEST(JsonChecker, Reader) {
|
||||
continue;
|
||||
|
||||
sprintf(filename, "jsonchecker/fail%d.json", i);
|
||||
char* json;
|
||||
size_t length;
|
||||
if (!(json = ReadFile(filename, length))) {
|
||||
char* json = ReadFile(filename, length);
|
||||
if (!json) {
|
||||
sprintf(filename, "../../bin/jsonchecker/fail%d.json", i);
|
||||
if (!(json = ReadFile(filename, length))) {
|
||||
json = ReadFile(filename, length);
|
||||
if (!json) {
|
||||
printf("jsonchecker file %s not found", filename);
|
||||
continue;
|
||||
}
|
||||
@@ -50,11 +51,12 @@ TEST(JsonChecker, Reader) {
|
||||
// passX.json
|
||||
for (int i = 1; i <= 3; i++) {
|
||||
sprintf(filename, "jsonchecker/pass%d.json", i);
|
||||
char* json;
|
||||
size_t length;
|
||||
if (!(json = ReadFile(filename, length))) {
|
||||
char* json = ReadFile(filename, length);
|
||||
if (!json) {
|
||||
sprintf(filename, "../../bin/jsonchecker/pass%d.json", i);
|
||||
if (!(json = ReadFile(filename, length))) {
|
||||
json = ReadFile(filename, length);
|
||||
if (!json) {
|
||||
printf("jsonchecker file %s not found", filename);
|
||||
continue;
|
||||
}
|
||||
@@ -65,4 +67,4 @@ TEST(JsonChecker, Reader) {
|
||||
EXPECT_TRUE(!document.HasParseError());
|
||||
free(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user