Skip to content

Compiler warning: unused parameter #2668

Closed
@itlods

Description

@itlods

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

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions