diff options
author | Dominic Sacré <dominic.sacre@gmx.de> | 2016-08-24 12:15:22 (GMT) |
---|---|---|
committer | Dominic Sacré <dominic.sacre@gmx.de> | 2018-08-31 12:57:23 (GMT) |
commit | d41f53ae7816863cc52bf3f357dff25597c58864 (patch) | |
tree | 3faa258a16d0664d24a0c0267d9563f296d73331 /googletest/include/gtest | |
parent | e41f38b3b7471bab8c43e98372aae78e425cd41a (diff) | |
download | googletest-d41f53ae7816863cc52bf3f357dff25597c58864.zip googletest-d41f53ae7816863cc52bf3f357dff25597c58864.tar.gz googletest-d41f53ae7816863cc52bf3f357dff25597c58864.tar.bz2 |
Make dummy variables static to avoid compiler warnings
Fix -Wmissing-variable-declarations warnings from Clang.
Diffstat (limited to 'googletest/include/gtest')
-rw-r--r-- | googletest/include/gtest/gtest-typed-test.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/googletest/include/gtest/gtest-typed-test.h b/googletest/include/gtest/gtest-typed-test.h index 29b0859..ea31567 100644 --- a/googletest/include/gtest/gtest-typed-test.h +++ b/googletest/include/gtest/gtest-typed-test.h @@ -206,7 +206,8 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes); typedef gtest_TypeParam_ TypeParam; \ virtual void TestBody(); \ }; \ - bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \ + static bool gtest_##CaseName##_##TestName##_registered_ \ + GTEST_ATTRIBUTE_UNUSED_ = \ ::testing::internal::TypeParameterizedTest< \ CaseName, \ ::testing::internal::TemplateSel<GTEST_TEST_CLASS_NAME_(CaseName, \ @@ -287,7 +288,7 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes); // since some compilers may choke on '>>' when passing a template // instance (e.g. Types<int>) # define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types, ...) \ - bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \ + static bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \ ::testing::internal::TypeParameterizedTestCase< \ CaseName, GTEST_CASE_NAMESPACE_(CaseName)::gtest_AllTests_, \ ::testing::internal::TypeList< Types >::type>:: \ |