From 10088504350a1b7192615382828fa8662c79949e Mon Sep 17 00:00:00 2001 From: Alex Karatarakis Date: Wed, 23 Jun 2021 14:57:22 -0700 Subject: [PATCH] Fix EXPECT_DEATH() and ASSERT_DEATH() triggering -Wcovered-switch-default EXPECT_DEATH() and ASSERT_DEATH() have a switch case where every possible case is covered. This makes the default case unnecessary and triggers -Wcovered-switch-default. Due to these being macros, the lines are expanded in user code and are thus subject to warnings of the target codebase. Fixes #3456 --- googletest/include/gtest/internal/gtest-death-test-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-death-test-internal.h b/googletest/include/gtest/internal/gtest-death-test-internal.h index 490296dfa..867a840d0 100644 --- a/googletest/include/gtest/internal/gtest-death-test-internal.h +++ b/googletest/include/gtest/internal/gtest-death-test-internal.h @@ -236,8 +236,6 @@ inline Matcher MakeDeathTestMatcher( gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \ break; \ } \ - default: \ - break; \ } \ } \ } else \