Skip to content

Commit

Permalink
Fix -Wunused warnings on JSON_DIAGNOSTICS (#2976)
Browse files Browse the repository at this point in the history
* Fix #2975

Define JSON_DIAGNOSTICS to 0 if not defined to fix annoying Wundef warnings.

* amalgamated
  • Loading branch information
gcerretani authored Aug 26, 2021
1 parent 1fd2213 commit 28a1697
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/nlohmann/detail/macro_scope.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,7 @@
#else
#define JSON_EXPLICIT explicit
#endif

#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
#endif
4 changes: 4 additions & 0 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2514,6 +2514,10 @@ JSON_HEDLEY_DIAGNOSTIC_POP
#define JSON_EXPLICIT explicit
#endif

#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
#endif


namespace nlohmann
{
Expand Down

0 comments on commit 28a1697

Please sign in to comment.