From 3bd0c58878bb4d413a4ef9ed701ec08e407420ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 11 Jul 2022 22:28:15 +0200 Subject: [PATCH] Fix Wunused-variable warning for MinGW Closes #2132 --- src/catch2/internal/catch_run_context.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/catch2/internal/catch_run_context.cpp b/src/catch2/internal/catch_run_context.cpp index e31f8a3f02..c8b0b30e39 100644 --- a/src/catch2/internal/catch_run_context.cpp +++ b/src/catch2/internal/catch_run_context.cpp @@ -500,6 +500,11 @@ namespace Catch { // before running the tests themselves, or the binary can crash // without failed test being reported. FatalConditionHandlerGuard _(&m_fatalConditionhandler); + // We keep having issue where some compilers warn about an unused + // variable, even though the type has non-trivial constructor and + // destructor. This is annoying and ugly, but it makes them stfu. + (void)_; + m_activeTestCase->invoke(); }