diff options
author | Geza Lore <gezalore@gmail.com> | 2016-06-17 15:32:25 +0100 |
---|---|---|
committer | Geza Lore <gezalore@gmail.com> | 2016-06-17 20:11:16 +0100 |
commit | cdd83a0bb264f6c304f98749a621e9654457ebcc (patch) | |
tree | e7f60365e630adf00012948ae944033a4a3c1cf2 | |
parent | a724477d6926c7fe0f20809cf26563c4047372b3 (diff) | |
download | libvpx-cdd83a0bb264f6c304f98749a621e9654457ebcc.tar libvpx-cdd83a0bb264f6c304f98749a621e9654457ebcc.tar.gz libvpx-cdd83a0bb264f6c304f98749a621e9654457ebcc.tar.bz2 libvpx-cdd83a0bb264f6c304f98749a621e9654457ebcc.zip |
Fix warnings from gtest under GCC 5 or newer.
Change-Id: I9661f2fe9d315dccae69caa70d929b5d9d93b7db
(cherry picked from commit 4c83fdd3d7cacd66a2c64451db0fb64e5b2ecf48)
-rw-r--r-- | third_party/googletest/README.libvpx | 6 | ||||
-rw-r--r-- | third_party/googletest/src/include/gtest/gtest.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/third_party/googletest/README.libvpx b/third_party/googletest/README.libvpx index 7201a67d3..1eca78dd9 100644 --- a/third_party/googletest/README.libvpx +++ b/third_party/googletest/README.libvpx @@ -12,4 +12,8 @@ failures, various options for running the tests, and XML test report generation. Local Modifications: -Removed unused declarations of kPathSeparatorString to have warning free build.
\ No newline at end of file +- Removed unused declarations of kPathSeparatorString to have warning + free build. +- Added GTEST_ATTRIBUTE_UNUSED_ to test registering dummies in TEST_P + and INSTANTIATE_TEST_CASE_P to remove warnings about unused variables + under GCC 5.
\ No newline at end of file diff --git a/third_party/googletest/src/include/gtest/gtest.h b/third_party/googletest/src/include/gtest/gtest.h index 4f3804f70..581a44e95 100644 --- a/third_party/googletest/src/include/gtest/gtest.h +++ b/third_party/googletest/src/include/gtest/gtest.h @@ -16960,7 +16960,7 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3, GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \ return 0; \ } \ - static int gtest_registering_dummy_; \ + static int gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_; \ GTEST_DISALLOW_COPY_AND_ASSIGN_(\ GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ }; \ @@ -16972,7 +16972,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(\ |