Skip to content

[nlohmann/json.hpp] fix warning with gcc 4.8#6699

Merged
linev merged 1 commit into
root-project:v6-22-00-patchesfrom
linev:nlohmann_warn_622
Oct 23, 2020
Merged

[nlohmann/json.hpp] fix warning with gcc 4.8#6699
linev merged 1 commit into
root-project:v6-22-00-patchesfrom
linev:nlohmann_warn_622

Conversation

@linev
Copy link
Copy Markdown
Member

@linev linev commented Oct 23, 2020

By chance internal data member is the same as "subtype" argument

Fixes warnings like:

In file included from /mnt/build/jenkins/night/LABEL/ROOT-centos7/SPEC/noimt/V/6-22/root/io/io/src/TBufferJSON.cxx:131:0:
/mnt/build/jenkins/night/LABEL/ROOT-centos7/SPEC/noimt/V/6-22/root/io/io/res/json.hpp: In constructor ‘nlohmann::byte_container_with_subtype<BinaryType>::byte_container_with_subtype(const container_type&, uint8_t)’:

/mnt/build/jenkins/night/LABEL/ROOT-centos7/SPEC/noimt/V/6-22/root/io/io/res/json.hpp:4452:9: warning: declaration of ‘subtype’ shadows a member of 'this' [-Wshadow]
         : container_type(b)
         ^
/mnt/build/jenkins/night/LABEL/ROOT-centos7/SPEC/noimt/V/6-22/root/io/io/res/json.hpp: In constructor ‘nlohmann::byte_container_with_subtype<BinaryType>::byte_container_with_subtype(nlohmann::byte_container_with_subtype<BinaryType>::container_type&&, uint8_t)’:

/mnt/build/jenkins/night/LABEL/ROOT-centos7/SPEC/noimt/V/6-22/root/io/io/res/json.hpp:4458:9: warning: declaration of ‘subtype’ shadows a member of 'this' [-Wshadow]
         : container_type(std::move(b))
         ^
/mnt/build/jenkins/night/LABEL/ROOT-centos7/SPEC/noimt/V/6-22/root/io/io/res/json.hpp: In member function ‘void nlohmann::byte_container_with_subtype<BinaryType>::set_subtype(uint8_t)’:

/mnt/build/jenkins/night/LABEL/ROOT-centos7/SPEC/noimt/V/6-22/root/io/io/res/json.hpp:4493:5: warning: declaration of ‘subtype’ shadows a member of 'this' [-Wshadow]
     {
     ^

By chance internal data member is the same as "subtype" argument
@linev linev added this to the 6.22/04 milestone Oct 23, 2020
@linev linev requested a review from Axel-Naumann October 23, 2020 11:43
@linev linev requested a review from pcanal as a code owner October 23, 2020 11:43
@linev linev self-assigned this Oct 23, 2020
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Copy Markdown

Build failed on mac1015/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2020-10-23T11:45:36.858Z] CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1576 (message):
  • [2020-10-23T11:45:36.858Z] CMake Error at /Users/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1051 (message):

@phsft-bot
Copy link
Copy Markdown

@phsft-bot
Copy link
Copy Markdown

@linev
Copy link
Copy Markdown
Member Author

linev commented Oct 23, 2020

jenkins producing many errors, but they all has nothing to do with PR

@linev linev merged commit 1fa1133 into root-project:v6-22-00-patches Oct 23, 2020
@linev linev deleted the nlohmann_warn_622 branch October 23, 2020 12:42
@phsft-bot
Copy link
Copy Markdown

@phsft-bot
Copy link
Copy Markdown

Build failed on mac1014/python3.
Running on macitois19.cern.ch:/ec/build/workspace/root-pullrequests-build
See console output.

Failing tests:

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.

3 participants