mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-27 11:06:53 +01:00
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:
@@ -50,8 +50,9 @@ static void TestStringStream() {
|
||||
StringStreamType iss(s);
|
||||
BasicIStreamWrapper<StringStreamType> is(iss);
|
||||
EXPECT_EQ(0, is.Tell());
|
||||
if (sizeof(Ch) == 1)
|
||||
if (sizeof(Ch) == 1) {
|
||||
EXPECT_EQ(0, is.Peek4()); // less than 4 bytes
|
||||
}
|
||||
for (int i = 0; i < 3; i++) {
|
||||
EXPECT_EQ(static_cast<size_t>(i), is.Tell());
|
||||
EXPECT_EQ('A' + i, is.Peek());
|
||||
|
||||
Reference in New Issue
Block a user