aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-07-14 22:36:31 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-07-14 22:36:31 +0000
commit447ed6474deca82844b211e57503579ab1c560f0 (patch)
tree1b59366f9b80c25b0ed734dbe5d588ffc0682ec9 /include
parent3899557cb8563bb0da8f44d435bb02b2095e07fb (diff)
downloadgoogletest-447ed6474deca82844b211e57503579ab1c560f0.tar.gz
googletest-447ed6474deca82844b211e57503579ab1c560f0.tar.bz2
googletest-447ed6474deca82844b211e57503579ab1c560f0.zip
Fixes warnings when built by GCC with -Wswitch-default. Original patch by Zhixu Liu (zhixu.liu@gmail.com).
Diffstat (limited to 'include')
-rw-r--r--include/gtest/internal/gtest-death-test-internal.h2
-rw-r--r--include/gtest/internal/gtest-port.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/gtest/internal/gtest-death-test-internal.h b/include/gtest/internal/gtest-death-test-internal.h
index e4330848..9bd2aa35 100644
--- a/include/gtest/internal/gtest-death-test-internal.h
+++ b/include/gtest/internal/gtest-death-test-internal.h
@@ -176,6 +176,8 @@ GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
break; \
} \
+ default: \
+ break; \
} \
} \
} else \
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h
index 0ad570af..aa3d0afd 100644
--- a/include/gtest/internal/gtest-port.h
+++ b/include/gtest/internal/gtest-port.h
@@ -535,7 +535,7 @@
#ifdef __INTEL_COMPILER
#define GTEST_AMBIGUOUS_ELSE_BLOCKER_
#else
-#define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: // NOLINT
+#define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT
#endif
// Use this annotation at the end of a struct/class definition to