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

Compiler warning: unused parameter #2668

Closed
2 tasks
itlods opened this issue Mar 5, 2021 · 1 comment · Fixed by #2561
Closed
2 tasks

Compiler warning: unused parameter #2668

itlods opened this issue Mar 5, 2021 · 1 comment · Fixed by #2561
Assignees
Labels
kind: bug release item: 🔨 further change solution: duplicate the issue is a duplicate; refer to the linked issue instead solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@itlods
Copy link

itlods commented Mar 5, 2021

g++ issue warning of unused parameter, when using a slightly pedantic warning setting

What is the issue you have?

in commit:
74cc0ab include/nlohmann/detail/exceptions.hpp (Niels Lohmann 2021-01-25 13:47:50 +0100 , line 71

I silenced it by duplicating the signature and moving them inside the if/else - perhaps there is a more elegant solution?

Please describe the steps to reproduce the issue.

g++ -std=c++17 -Wall -Wextra -Werror -Wconversion
-Wsign-promo -Wmissing-include-dirs -Wnon-virtual-dtor -Wfloat-equal
-Wcast-qual -Wwrite-strings -Wredundant-decls
-Wpointer-arith -Wno-unknown-pragmas -Wctor-dtor-privacy
-Wreorder -Weffc++ -Wold-style-cast -Woverloaded-virtual -Wshadow -pedantic
on some file including the single include.

Which compiler and operating system are you using?

debian9, g++

  • [x ] latest release version 3.9.1
  • other release - please state the version: ___
  • the develop branch
@nlohmann
Copy link
Owner

Duplicate of #2658.

@nlohmann nlohmann added the solution: duplicate the issue is a duplicate; refer to the linked issue instead label Mar 23, 2021
@nlohmann nlohmann linked a pull request Mar 23, 2021 that will close this issue
@nlohmann nlohmann added release item: 🔨 further change solution: proposed fix a fix for the issue has been proposed and waits for confirmation labels Mar 24, 2021
@nlohmann nlohmann self-assigned this Mar 24, 2021
@nlohmann nlohmann added this to the Release 3.9.2 milestone Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug release item: 🔨 further change solution: duplicate the issue is a duplicate; refer to the linked issue instead solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants