From e7c021f5cb9bebfd8d02e6d991eb2a4c3614af6a Mon Sep 17 00:00:00 2001 From: Harinath Nampally Date: Sat, 25 Jan 2025 09:52:56 -0500 Subject: [PATCH] fix ununsed variable static check Signed-off-by: Harinath Nampally --- include/nlohmann/detail/macro_scope.hpp | 1 + single_include/nlohmann/json.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/include/nlohmann/detail/macro_scope.hpp b/include/nlohmann/detail/macro_scope.hpp index e9eba73a4..8bf0633fb 100644 --- a/include/nlohmann/detail/macro_scope.hpp +++ b/include/nlohmann/detail/macro_scope.hpp @@ -26,6 +26,7 @@ template #if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(EXCEPTIONS) throw std::forward(exception); #else + (void)exception; std::abort(); #endif } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index f904da159..94768c22d 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -2392,6 +2392,7 @@ template #if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(EXCEPTIONS) throw std::forward(exception); #else + (void)exception; std::abort(); #endif }