Fix warnings on GCC 6 and later (closes #666)

* document.h
  * suppress -Wterminate on GCC 6.x and later
  * simplify warning handling
* schema.h
  * drop RAPIDJSON_NOEXCEPT from GenericSchemaDocument constructor
    (calls RAPIDJSON_NEW anyway)
  * simplify warning handling
    (avoids RAPIDJSON_POP mismatch on Clang)
* encodingtest.cpp, istreamwrappertest.cpp
  * work around -Wdangling-else
* readertest.cpp
  * suppress -Wdangling-else
This commit is contained in:
Philipp A. Hartmann
2016-06-23 21:42:16 +02:00
parent 1c087b77cb
commit f6a07692f9
5 changed files with 18 additions and 46 deletions

View File

@@ -302,8 +302,9 @@ TEST(EncodingsTest, UTF8) {
decodedCount++;
}
if (*encodedStr) // This decoder cannot handle U+0000
if (*encodedStr) { // This decoder cannot handle U+0000
EXPECT_EQ(1u, decodedCount); // Should only contain one code point
}
EXPECT_EQ(UTF8_ACCEPT, state);
if (UTF8_ACCEPT != state)