Fixes unused function warning on Mac, and fixes compatibility with newer GCC.

This commit is contained in:
zhanyong.wan
2013-02-28 23:52:42 +00:00
parent 6a036a5c8c
commit fc01f532a6
3 changed files with 6 additions and 6 deletions

View File

@@ -465,6 +465,8 @@ TEST_F(TestForDeathTest, MixedStyles) {
EXPECT_DEATH(_exit(1), "");
}
# if GTEST_HAS_CLONE && GTEST_HAS_PTHREAD
namespace {
bool pthread_flag;
@@ -475,8 +477,6 @@ void SetPthreadFlag() {
} // namespace
# if GTEST_HAS_CLONE && GTEST_HAS_PTHREAD
TEST_F(TestForDeathTest, DoesNotExecuteAtforkHooks) {
if (!testing::GTEST_FLAG(death_test_use_fork)) {
testing::GTEST_FLAG(death_test_style) = "threadsafe";