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
546e2cbf
Unverified
Commit
546e2cbf
authored
Mar 13, 2019
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fixed some warnings
parent
d39842e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
3 deletions
+4
-3
Makefile
Makefile
+1
-0
include/nlohmann/detail/output/serializer.hpp
include/nlohmann/detail/output/serializer.hpp
+1
-1
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+1
-1
test/src/unit-regression.cpp
test/src/unit-regression.cpp
+1
-1
No files found.
Makefile
View file @
546e2cbf
...
@@ -136,6 +136,7 @@ pedantic_clang:
...
@@ -136,6 +136,7 @@ pedantic_clang:
-Wno-float-equal
\
-Wno-float-equal
\
-Wno-switch-enum -Wno-covered-switch-default
\
-Wno-switch-enum -Wno-covered-switch-default
\
-Wno-c++2a-compat
\
-Wno-c++2a-compat
\
-Wno-c++17-extensions
\
-Wno-padded"
-Wno-padded"
# calling GCC with most warnings
# calling GCC with most warnings
...
...
include/nlohmann/detail/output/serializer.hpp
View file @
546e2cbf
...
@@ -620,7 +620,7 @@ class serializer
...
@@ -620,7 +620,7 @@ class serializer
if
(
is_negative
)
if
(
is_negative
)
{
{
*
buffer_ptr
=
'-'
;
*
buffer_ptr
=
'-'
;
abs_value
=
static_cast
<
number_unsigned_t
>
(
-
1
-
x
)
+
1
;
abs_value
=
static_cast
<
number_unsigned_t
>
(
std
::
abs
(
static_cast
<
std
::
intmax_t
>
(
x
)))
;
// account one more byte for the minus sign
// account one more byte for the minus sign
n_chars
=
1
+
count_digits
(
abs_value
);
n_chars
=
1
+
count_digits
(
abs_value
);
...
...
single_include/nlohmann/json.hpp
View file @
546e2cbf
...
@@ -11533,7 +11533,7 @@ class serializer
...
@@ -11533,7 +11533,7 @@ class serializer
if
(
is_negative
)
if
(
is_negative
)
{
{
*
buffer_ptr
=
'-'
;
*
buffer_ptr
=
'-'
;
abs_value
=
static_cast
<
number_unsigned_t
>
(
-
1
-
x
)
+
1
;
abs_value
=
static_cast
<
number_unsigned_t
>
(
std
::
abs
(
static_cast
<
std
::
intmax_t
>
(
x
)))
;
// account one more byte for the minus sign
// account one more byte for the minus sign
n_chars
=
1
+
count_digits
(
abs_value
);
n_chars
=
1
+
count_digits
(
abs_value
);
...
...
test/src/unit-regression.cpp
View file @
546e2cbf
...
@@ -1762,7 +1762,7 @@ TEST_CASE("regression tests")
...
@@ -1762,7 +1762,7 @@ TEST_CASE("regression tests")
-
54
,
-
28
,
-
26
-
54
,
-
28
,
-
26
};
};
std
::
string
s
;
std
::
string
s
;
for
(
int
i
=
0
;
i
<
sizeof
(
data
)
/
sizeof
(
int
);
i
++
)
for
(
unsigned
i
=
0
;
i
<
sizeof
(
data
)
/
sizeof
(
int
);
i
++
)
{
{
s
+=
static_cast
<
char
>
(
data
[
i
]);
s
+=
static_cast
<
char
>
(
data
[
i
]);
}
}
...
...
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