From 12885446d8cdf05a3df5f5579cf8e496b5578ea0 Mon Sep 17 00:00:00 2001 From: aodq Date: Thu, 23 Jul 2020 13:21:38 -0400 Subject: [PATCH] fixes unused variable 'ex' for #2304 --- include/nlohmann/detail/input/json_sax.hpp | 2 ++ single_include/nlohmann/json.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/nlohmann/detail/input/json_sax.hpp b/include/nlohmann/detail/input/json_sax.hpp index ae6a6cbe..d4c32913 100644 --- a/include/nlohmann/detail/input/json_sax.hpp +++ b/include/nlohmann/detail/input/json_sax.hpp @@ -263,6 +263,7 @@ class json_sax_dom_parser const Exception& ex) { errored = true; + (void)ex; if (allow_exceptions) { JSON_THROW(ex); @@ -501,6 +502,7 @@ class json_sax_dom_callback_parser const Exception& ex) { errored = true; + (void)ex; if (allow_exceptions) { JSON_THROW(ex); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 0b7d2411..67beb73a 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -5441,6 +5441,7 @@ class json_sax_dom_parser const Exception& ex) { errored = true; + (void)ex; if (allow_exceptions) { JSON_THROW(ex); @@ -5679,6 +5680,7 @@ class json_sax_dom_callback_parser const Exception& ex) { errored = true; + (void)ex; if (allow_exceptions) { JSON_THROW(ex);