Unused variable in exception class when not using improved diagnostics #2646
Labels
kind: bug
release item: 🔨 further change
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Milestone
What is the issue you have?
At include/nlohmann/detail/exceptions.hpp:71 or single_include/nlohmann/json.hpp:2662 the parameter
leaf_element
is unused when the macroJSON_DIAGNOSTICS
is undefined. This may cause a compiler to produce a warning or an error.Please describe the steps to reproduce the issue.
g++ -Wunused-parameter <filename>
.Can you provide a small but working code example?
What is the expected behavior?
Compiler does not produce a warning.
And what is the actual behavior instead?
Compiler produces a warning.
Which compiler and operating system are you using?
Which version of the library did you use?
develop
branchIf you experience a compilation error: can you compile and run the unit tests?
The text was updated successfully, but these errors were encountered: