Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -Wunused warnings on JSON_DIAGNOSTICS #2976

Merged
merged 2 commits into from
Aug 26, 2021

Conversation

gcerretani
Copy link
Contributor

@gcerretani gcerretani commented Aug 25, 2021

Fixes #2975


Pull request checklist

Read the Contribution Guidelines for detailed information.

  • Changes are described in the pull request, or an existing issue is referenced.
  • The test suite compiles and runs without error.
  • Code coverage is 100%. Test cases can be added by editing the test suite.
  • The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

gcerretani and others added 2 commits August 25, 2021 17:25
Define JSON_DIAGNOSTICS to 0 if not defined to fix annoying Wundef warnings.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 9325ffb on gcerretani:patch-1 into 1fd2213 on nlohmann:develop.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann
Copy link
Owner

Thanks!

kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Sep 6, 2021
Release date: 2021-08-26
SHA-256: 059743e48b37e41579ee3a92e82e984bfa0d2a9a2b20b175d04db8089f46f047 (json.hpp)
61e605be15e88deeac4582aaf01c09d616f8302edde7adcaba9261ddc3b4ceca (include.zip)

Summary
This release is made days after the 3.10.1 release due to a bug in the release script:
The 3.10.1 release at GitHub contained the correct files,
but the associated tag v3.10.1 points to the wrong commit.
This release is made with a fixed build script. All changes are backward-compatible.

Improvements
Fix the release scripts to correctly tag releases. nlohmann/json#2973
Fix some -Wunused warnings on JSON_DIAGNOSTICS when the library is built without CMake.
nlohmann/json#2975
nlohmann/json#2976

Deprecated functions
Passing iterator pairs or pointer/length pairs to parsing functions
(basic_json::parse, basic_json::accept, basic_json::sax_parse, basic_json::from_cbor,
basic_json::from_msgpack, basic_json::from_ubjson, basic_json::from_bson)
via initializer lists is deprecated.
Instead, pass two iterators; for instance, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len}).

-License-Update: Copyright year updated to 2021.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
Release date: 2021-08-26
SHA-256: 059743e48b37e41579ee3a92e82e984bfa0d2a9a2b20b175d04db8089f46f047 (json.hpp)
61e605be15e88deeac4582aaf01c09d616f8302edde7adcaba9261ddc3b4ceca (include.zip)

Summary
This release is made days after the 3.10.1 release due to a bug in the release script:
The 3.10.1 release at GitHub contained the correct files,
but the associated tag v3.10.1 points to the wrong commit.
This release is made with a fixed build script. All changes are backward-compatible.

Improvements
Fix the release scripts to correctly tag releases. nlohmann/json#2973
Fix some -Wunused warnings on JSON_DIAGNOSTICS when the library is built without CMake.
nlohmann/json#2975
nlohmann/json#2976

Deprecated functions
Passing iterator pairs or pointer/length pairs to parsing functions
(basic_json::parse, basic_json::accept, basic_json::sax_parse, basic_json::from_cbor,
basic_json::from_msgpack, basic_json::from_ubjson, basic_json::from_bson)
via initializer lists is deprecated.
Instead, pass two iterators; for instance, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len}).

-License-Update: Copyright year updated to 2021.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
Release date: 2021-08-26
SHA-256: 059743e48b37e41579ee3a92e82e984bfa0d2a9a2b20b175d04db8089f46f047 (json.hpp)
61e605be15e88deeac4582aaf01c09d616f8302edde7adcaba9261ddc3b4ceca (include.zip)

Summary
This release is made days after the 3.10.1 release due to a bug in the release script:
The 3.10.1 release at GitHub contained the correct files,
but the associated tag v3.10.1 points to the wrong commit.
This release is made with a fixed build script. All changes are backward-compatible.

Improvements
Fix the release scripts to correctly tag releases. nlohmann/json#2973
Fix some -Wunused warnings on JSON_DIAGNOSTICS when the library is built without CMake.
nlohmann/json#2975
nlohmann/json#2976

Deprecated functions
Passing iterator pairs or pointer/length pairs to parsing functions
(basic_json::parse, basic_json::accept, basic_json::sax_parse, basic_json::from_cbor,
basic_json::from_msgpack, basic_json::from_ubjson, basic_json::from_bson)
via initializer lists is deprecated.
Instead, pass two iterators; for instance, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len}).

-License-Update: Copyright year updated to 2021.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Annoying -Wundef on new JSON_DIAGNOSTICS macro
3 participants