From 87eaa3c525eb65775e6d77403b83a273a2397099 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 12 Feb 2021 10:36:18 +0000 Subject: libstdc++: Add unused attributes to shared_ptr functions This avoids some warnings when building with -fno-rtti because the function parameters are only used when RTTI is enabled. libstdc++-v3/ChangeLog: * include/bits/shared_ptr_base.h (__shared_ptr::_M_get_deleter): Add unused attribute to parameter. * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Likewise. --- libstdc++-v3/src/c++11/shared_ptr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libstdc++-v3/src/c++11') diff --git a/libstdc++-v3/src/c++11/shared_ptr.cc b/libstdc++-v3/src/c++11/shared_ptr.cc index 13e2d520199..4678fbeffe2 100644 --- a/libstdc++-v3/src/c++11/shared_ptr.cc +++ b/libstdc++-v3/src/c++11/shared_ptr.cc @@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif bool - _Sp_make_shared_tag::_S_eq(const type_info& ti) noexcept + _Sp_make_shared_tag::_S_eq(const type_info& ti [[gnu::unused]]) noexcept { #if __cpp_rtti return ti == typeid(_Sp_make_shared_tag); -- cgit v1.2.3