Skip to content

Commit 5cfe9ce

Browse files
committed
neorados/test: use [[maybe_unused]] instead of GTEST_ATTRIBUTE_UNUSED_
This change: - Aligns with GoogleTest's own evolution, which now uses `[[maybe_unused]]` internally (via `GTEST_INTERNAL_ATTRIBUTE_MAYBE_UNUSED`) as of google/googletest@5a37b517 - Leverages C++20 features already available in Ceph - Removes dependency on GoogleTest internal macros - Enables updating the GoogleTest submodule to silence CMake warnings Using the standard C++ attribute provides better compatibility and future-proofing than relying on GoogleTest's internal implementation details. This change also allows us to bump up googletest submodule to silence a CMake warning. Signed-off-by: Kefu Chai <[email protected]>
1 parent 9a49523 commit 5cfe9ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/neorados/common_tests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class NeoRadosECTest : public NeoRadosTestBase {
404404
\
405405
private: \
406406
boost::asio::awaitable<void> CoTestBody() override; \
407-
static ::testing::TestInfo *const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
407+
[[maybe_unused]] static ::testing::TestInfo *const test_info_; \
408408
}; \
409409
\
410410
::testing::TestInfo *const GTEST_TEST_CLASS_NAME_(test_suite_name, \

0 commit comments

Comments
 (0)