aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest
diff options
context:
space:
mode:
authorkosak <kosak@google.com>2015-07-13 22:45:50 +0000
committerkosak <kosak@google.com>2015-07-13 22:45:50 +0000
commitd5ac8cd9ebdb63f7790d2e6c9a7e2aeeed3c2690 (patch)
tree21c6044eb237c66d6ef97417ec6e40867dead1e4 /include/gtest
parent0f3d673be15d7e6e01dccc9a7e66097fe7592c8f (diff)
downloadgoogletest-d5ac8cd9ebdb63f7790d2e6c9a7e2aeeed3c2690.tar.gz
googletest-d5ac8cd9ebdb63f7790d2e6c9a7e2aeeed3c2690.tar.bz2
googletest-d5ac8cd9ebdb63f7790d2e6c9a7e2aeeed3c2690.zip
Add GTEST_ATTRIBUTE_UNUSED_ to the dummy variable generated in
INSTANTIATE_TEST_CASE_P.
Diffstat (limited to 'include/gtest')
-rw-r--r--include/gtest/gtest-param-test.h2
-rw-r--r--include/gtest/gtest-param-test.h.pump2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/gtest/gtest-param-test.h b/include/gtest/gtest-param-test.h
index d6702c8f..adcc49ba 100644
--- a/include/gtest/gtest-param-test.h
+++ b/include/gtest/gtest-param-test.h
@@ -1406,7 +1406,7 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
::testing::internal::ParamGenerator<test_case_name::ParamType> \
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
- int gtest_##prefix##test_case_name##_dummy_ = \
+ int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
GetTestCasePatternHolder<test_case_name>(\
#test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
diff --git a/include/gtest/gtest-param-test.h.pump b/include/gtest/gtest-param-test.h.pump
index 2dc9303b..55ddd2d0 100644
--- a/include/gtest/gtest-param-test.h.pump
+++ b/include/gtest/gtest-param-test.h.pump
@@ -472,7 +472,7 @@ internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
::testing::internal::ParamGenerator<test_case_name::ParamType> \
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
- int gtest_##prefix##test_case_name##_dummy_ = \
+ int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
GetTestCasePatternHolder<test_case_name>(\
#test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\