diff options
author | Derek Mauro <dmauro@google.com> | 2024-04-16 20:15:51 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-04-16 20:16:40 (GMT) |
commit | 5a37b517ad4ab6738556f0284c256cae1466c5b4 (patch) | |
tree | c0da707ac6a19f0aacd05199bcd53d42a77481ed /googletest/test | |
parent | 5197b1a8e6a1ef9f214f4aa537b0be17cbf91946 (diff) | |
download | googletest-5a37b517ad4ab6738556f0284c256cae1466c5b4.zip googletest-5a37b517ad4ab6738556f0284c256cae1466c5b4.tar.gz googletest-5a37b517ad4ab6738556f0284c256cae1466c5b4.tar.bz2 |
Use `[[maybe_unused]]` when it is available to avoid
-Wused-but-marked-unused warnings
PiperOrigin-RevId: 625430612
Change-Id: Ia9d2e47984e1e6f91966afae8a6750119ae69446
Diffstat (limited to 'googletest/test')
-rw-r--r-- | googletest/test/gtest_unittest.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index edbe2ea..5ded865 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -2163,7 +2163,7 @@ class UnitTestRecordPropertyTestEnvironment : public Environment { }; // This will test property recording outside of any test or test case. -static Environment* record_property_env GTEST_ATTRIBUTE_UNUSED_ = +GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static Environment* record_property_env = AddGlobalTestEnvironment(new UnitTestRecordPropertyTestEnvironment); // This group of tests is for predicate assertions (ASSERT_PRED*, etc) @@ -6705,8 +6705,9 @@ TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) { // Verifies that StaticAssertTypeEq works in a namespace scope. -static bool dummy1 GTEST_ATTRIBUTE_UNUSED_ = StaticAssertTypeEq<bool, bool>(); -static bool dummy2 GTEST_ATTRIBUTE_UNUSED_ = +GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static bool dummy1 = + StaticAssertTypeEq<bool, bool>(); +GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED static bool dummy2 = StaticAssertTypeEq<const int, const int>(); // Verifies that StaticAssertTypeEq works in a class. |