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:
miloyip@gmail.com
2012-11-13 08:02:22 +00:00
parent 821c6ab73c
commit 9c68ce986e
19 changed files with 220 additions and 135 deletions

View File

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