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 unreachable-code-return warnings

Commit
10596b22781f03df3d35f34187213f6f8709e453
Author
Holger Kaelberer ·
Committer
Martin Hořeňovský
Parents
897fe2a01b7e

Files · Download .tar.gz

Changes

 src/catch2/internal/catch_reporter_registry.cpp | 2 --
 tests/SelfTest/UsageTests/Exception.tests.cpp   | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/catch2/internal/catch_reporter_registry.cpp b/src/catch2/internal/catch_reporter_registry.cpp
index 8f13ae56..b2b0cd07 100644
--- a/src/catch2/internal/catch_reporter_registry.cpp
+++ b/src/catch2/internal/catch_reporter_registry.cpp
@@ -57,8 +57,6 @@ namespace Catch {
         auto it = m_impl->factories.find( name );
         if ( it == m_impl->factories.end() ) return nullptr;
         return it->second->create( CATCH_MOVE( config ) );
-
-        return IEventListenerPtr();
     }
 
     void ReporterRegistry::registerReporter( std::string const& name,
diff --git a/tests/SelfTest/UsageTests/Exception.tests.cpp b/tests/SelfTest/UsageTests/Exception.tests.cpp
index f917932f..4f91a30c 100644
--- a/tests/SelfTest/UsageTests/Exception.tests.cpp
+++ b/tests/SelfTest/UsageTests/Exception.tests.cpp
@@ -20,7 +20,7 @@
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wweak-vtables"
 #pragma clang diagnostic ignored "-Wmissing-noreturn"
-#pragma clang diagnostic ignored "-Wunreachable-code"
+#pragma clang diagnostic ignored "-Wunreachable-code-return"
 #endif
 
 namespace {