From a36dda2b0ead8a8c8c43ebfff2e020c2c631d3ee Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sat, 21 Jan 2012 18:02:01 +0000 Subject: Remove unreachable defaults from gtest. This will ensure LLVM and Clang build -Wswitch-enum-redundant-default (an on-by-default warning I'm about to add to Clang). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148639 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/unittest/googletest/gtest-death-test.cc | 1 - utils/unittest/googletest/gtest.cc | 2 -- .../googletest/include/gtest/internal/gtest-death-test-internal.h | 2 -- 3 files changed, 5 deletions(-) (limited to 'utils') diff --git a/utils/unittest/googletest/gtest-death-test.cc b/utils/unittest/googletest/gtest-death-test.cc index 6589385..bf7e32c 100644 --- a/utils/unittest/googletest/gtest-death-test.cc +++ b/utils/unittest/googletest/gtest-death-test.cc @@ -527,7 +527,6 @@ bool DeathTestImpl::Passed(bool status_ok) { } break; case IN_PROGRESS: - default: GTEST_LOG_(FATAL) << "DeathTest::Passed somehow called before conclusion of test"; } diff --git a/utils/unittest/googletest/gtest.cc b/utils/unittest/googletest/gtest.cc index 7624497..6538924 100644 --- a/utils/unittest/googletest/gtest.cc +++ b/utils/unittest/googletest/gtest.cc @@ -2480,8 +2480,6 @@ static const char * TestPartResultTypeToString(TestPartResult::Type type) { #else return "Failure\n"; #endif - default: - return "Unknown result type"; } } diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h b/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h index 1d9f83b..7bac2bd 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h @@ -207,8 +207,6 @@ GTEST_API_ bool ExitedUnsuccessfully(int exit_status); gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \ break; \ } \ - default: \ - break; \ } \ } \ } else \ -- cgit v1.1