Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
6da92274
Commit
6da92274
authored
Jun 27, 2016
by
Milo Yip
Committed by
GitHub
Jun 27, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #667 from pah/fixes/666
Fix warnings on GCC 6 and later (closes #666)
parents
cf7324b4
f6a07692
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
46 deletions
+18
-46
document.h
include/rapidjson/document.h
+4
-14
schema.h
include/rapidjson/schema.h
+6
-22
encodingstest.cpp
test/unittest/encodingstest.cpp
+2
-1
istreamwrappertest.cpp
test/unittest/istreamwrappertest.cpp
+2
-1
readertest.cpp
test/unittest/readertest.cpp
+4
-8
No files found.
include/rapidjson/document.h
View file @
6da92274
...
...
@@ -25,23 +25,24 @@
#include <new> // placement new
#include <limits>
#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
#ifdef _MSC_VER
RAPIDJSON_DIAG_OFF
(
4127
)
// conditional expression is constant
RAPIDJSON_DIAG_OFF
(
4244
)
// conversion from kXxxFlags to 'uint16_t', possible loss of data
#endif
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
)
#endif
#ifdef __GNUC__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
effc
++
)
#if __GNUC__ >= 6
RAPIDJSON_DIAG_OFF
(
terminate
)
// ignore throwing RAPIDJSON_ASSERT in RAPIDJSON_NOEXCEPT functions
#endif
#endif // __GNUC__
#ifndef RAPIDJSON_NOMEMBERITERATORCLASS
#include <iterator> // std::iterator, std::random_access_iterator_tag
...
...
@@ -2569,17 +2570,6 @@ private:
};
RAPIDJSON_NAMESPACE_END
#ifdef _MSC_VER
RAPIDJSON_DIAG_POP
#endif
#ifdef __clang__
RAPIDJSON_DIAG_POP
#endif
#ifdef __GNUC__
RAPIDJSON_DIAG_POP
#endif
#endif // RAPIDJSON_DOCUMENT_H_
include/rapidjson/schema.h
View file @
6da92274
...
...
@@ -19,13 +19,6 @@
#include "pointer.h"
#include <cmath> // abs, floor
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
weak
-
vtables
)
RAPIDJSON_DIAG_OFF
(
exit
-
time
-
destructors
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
-
pedantic
)
#endif
#if !defined(RAPIDJSON_SCHEMA_USE_INTERNALREGEX)
#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 1
#else
...
...
@@ -58,18 +51,20 @@ RAPIDJSON_DIAG_OFF(c++98-compat-pedantic)
#include "stringbuffer.h"
#endif
#if defined(__GNUC__)
RAPIDJSON_DIAG_PUSH
#if defined(__GNUC__)
RAPIDJSON_DIAG_OFF
(
effc
++
)
#endif
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
weak
-
vtables
)
RAPIDJSON_DIAG_OFF
(
exit
-
time
-
destructors
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
-
pedantic
)
RAPIDJSON_DIAG_OFF
(
variadic
-
macros
)
#endif
#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4512
)
// assignment operator could not be generated
#endif
...
...
@@ -1343,7 +1338,7 @@ public:
\param remoteProvider An optional remote schema document provider for resolving remote reference. Can be null.
\param allocator An optional allocator instance for allocating memory. Can be null.
*/
GenericSchemaDocument
(
const
ValueType
&
document
,
IRemoteSchemaDocumentProviderType
*
remoteProvider
=
0
,
Allocator
*
allocator
=
0
)
RAPIDJSON_NOEXCEPT
:
GenericSchemaDocument
(
const
ValueType
&
document
,
IRemoteSchemaDocumentProviderType
*
remoteProvider
=
0
,
Allocator
*
allocator
=
0
)
:
remoteProvider_
(
remoteProvider
),
allocator_
(
allocator
),
ownAllocator_
(),
...
...
@@ -2006,17 +2001,6 @@ private:
};
RAPIDJSON_NAMESPACE_END
#if defined(__GNUC__)
RAPIDJSON_DIAG_POP
#endif
#ifdef __clang__
RAPIDJSON_DIAG_POP
#endif
#ifdef _MSC_VER
RAPIDJSON_DIAG_POP
#endif
#endif // RAPIDJSON_SCHEMA_H_
test/unittest/encodingstest.cpp
View file @
6da92274
...
...
@@ -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
)
...
...
test/unittest/istreamwrappertest.cpp
View file @
6da92274
...
...
@@ -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
());
...
...
test/unittest/readertest.cpp
View file @
6da92274
...
...
@@ -23,15 +23,17 @@
using
namespace
rapidjson
;
#ifdef __GNUC__
RAPIDJSON_DIAG_PUSH
#ifdef __GNUC__
RAPIDJSON_DIAG_OFF
(
effc
++
)
RAPIDJSON_DIAG_OFF
(
float
-
equal
)
RAPIDJSON_DIAG_OFF
(
missing
-
noreturn
)
#if __GNUC__ >= 6
RAPIDJSON_DIAG_OFF
(
dangling
-
else
)
#endif
#endif // __GNUC__
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
variadic
-
macros
)
RAPIDJSON_DIAG_OFF
(
c
++
98
-
compat
-
pedantic
)
#endif
...
...
@@ -1839,10 +1841,4 @@ TEST(Reader, ParseNanAndInfinity) {
#undef TEST_NAN_INF
}
#ifdef __GNUC__
RAPIDJSON_DIAG_POP
#endif
#ifdef __clang__
RAPIDJSON_DIAG_POP
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment