Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
19647e08
Unverified
Commit
19647e08
authored
Oct 25, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fixed compiler warnings
parent
62126278
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
11 deletions
+9
-11
include/nlohmann/detail/input/binary_reader.hpp
include/nlohmann/detail/input/binary_reader.hpp
+2
-2
include/nlohmann/detail/output/serializer.hpp
include/nlohmann/detail/output/serializer.hpp
+1
-0
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+3
-2
test/src/fuzzer-parse_json.cpp
test/src/fuzzer-parse_json.cpp
+0
-4
test/src/unit-bson.cpp
test/src/unit-bson.cpp
+3
-3
No files found.
include/nlohmann/detail/input/binary_reader.hpp
View file @
19647e08
...
...
@@ -246,13 +246,13 @@ class binary_reader
case
0x10
:
// int32
{
std
::
int32_t
value
;
return
get_number
<
std
::
int32_t
,
true
>
(
input_format_t
::
bson
,
value
)
and
sax
->
number_integer
(
static_cast
<
std
::
int32_t
>
(
value
)
);
return
get_number
<
std
::
int32_t
,
true
>
(
input_format_t
::
bson
,
value
)
and
sax
->
number_integer
(
value
);
}
case
0x12
:
// int64
{
std
::
int64_t
value
;
return
get_number
<
std
::
int64_t
,
true
>
(
input_format_t
::
bson
,
value
)
and
sax
->
number_integer
(
static_cast
<
std
::
int64_t
>
(
value
)
);
return
get_number
<
std
::
int64_t
,
true
>
(
input_format_t
::
bson
,
value
)
and
sax
->
number_integer
(
value
);
}
default:
// anything else not supported (yet)
...
...
include/nlohmann/detail/output/serializer.hpp
View file @
19647e08
...
...
@@ -463,6 +463,7 @@ class serializer
continue
;
}
}
break
;
}
default:
// decode found yet incomplete multi-byte code point
...
...
single_include/nlohmann/json.hpp
View file @
19647e08
...
...
@@ -6547,13 +6547,13 @@ class binary_reader
case
0x10
:
// int32
{
std
::
int32_t
value
;
return
get_number
<
std
::
int32_t
,
true
>
(
input_format_t
::
bson
,
value
)
and
sax
->
number_integer
(
static_cast
<
std
::
int32_t
>
(
value
)
);
return
get_number
<
std
::
int32_t
,
true
>
(
input_format_t
::
bson
,
value
)
and
sax
->
number_integer
(
value
);
}
case
0x12
:
// int64
{
std
::
int64_t
value
;
return
get_number
<
std
::
int64_t
,
true
>
(
input_format_t
::
bson
,
value
)
and
sax
->
number_integer
(
static_cast
<
std
::
int64_t
>
(
value
)
);
return
get_number
<
std
::
int64_t
,
true
>
(
input_format_t
::
bson
,
value
)
and
sax
->
number_integer
(
value
);
}
default:
// anything else not supported (yet)
...
...
@@ -11161,6 +11161,7 @@ class serializer
continue
;
}
}
break
;
}
default:
// decode found yet incomplete multi-byte code point
...
...
test/src/fuzzer-parse_json.cpp
View file @
19647e08
...
...
@@ -60,10 +60,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
// parse errors are ok, because input may be random bytes
}
catch
(
const
json
::
out_of_range
&
)
{
// parse errors are ok, because input may be random bytes
}
catch
(
const
json
::
out_of_range
&
)
{
// out of range errors may happen if provided sizes are excessive
}
...
...
test/src/unit-bson.cpp
View file @
19647e08
...
...
@@ -1013,7 +1013,7 @@ TEST_CASE("BSON numerical data")
{
"entry"
,
i
}
};
std
::
uint64_t
iu
=
*
reinterpret_cast
<
std
::
uint64_t
*>
(
&
i
)
;
auto
iu
=
i
;
std
::
vector
<
uint8_t
>
expected_bson
=
{
0x10u
,
0x00u
,
0x00u
,
0x00u
,
// size (little endian)
...
...
@@ -1068,7 +1068,7 @@ TEST_CASE("BSON numerical data")
{
"entry"
,
i
}
};
std
::
uint64_t
iu
=
*
reinterpret_cast
<
std
::
uint64_t
*>
(
&
i
)
;
auto
iu
=
i
;
std
::
vector
<
uint8_t
>
expected_bson
=
{
0x14u
,
0x00u
,
0x00u
,
0x00u
,
// size (little endian)
...
...
@@ -1118,7 +1118,7 @@ TEST_CASE("BSON numerical data")
{
"entry"
,
i
}
};
std
::
uint64_t
iu
=
*
reinterpret_cast
<
std
::
uint64_t
*>
(
&
i
)
;
auto
iu
=
i
;
std
::
vector
<
uint8_t
>
expected_bson
=
{
0x14u
,
0x00u
,
0x00u
,
0x00u
,
// size (little endian)
...
...
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