Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Fix 'defined but not used' warning

The warning occurred when !CATCH_CONFIG_WINDOWS_SEH
&& !CATCH_CONFIG_POSIX_SIGNALS.
Commit
865d5f59b49c3e823c471dc2022116a10f33b0c4
Author
Tomas Zeman ·
Committer
Martin Hořeňovský
Parents
05cd05743a75

Files · Download .tar.gz

Changes

 include/internal/catch_fatal_condition.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/internal/catch_fatal_condition.cpp b/include/internal/catch_fatal_condition.cpp
index a356b7f5..ca72d980 100644
--- a/include/internal/catch_fatal_condition.cpp
+++ b/include/internal/catch_fatal_condition.cpp
@@ -17,6 +17,8 @@
 #    pragma GCC diagnostic ignored "-Wmissing-field-initializers"
 #endif
 
+#if defined( CATCH_CONFIG_WINDOWS_SEH ) || defined( CATCH_CONFIG_POSIX_SIGNALS )
+
 namespace {
     // Report the error condition
     void reportFatal( char const * const message ) {
@@ -24,6 +26,8 @@ namespace {
     }
 }
 
+#endif // signals/SEH handling
+
 #if defined( CATCH_CONFIG_WINDOWS_SEH )
 
 namespace Catch {