aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-08-08 22:01:36 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-08-09 15:19:15 +0100
commitaf89c7792d722b7c7c2568bd4dfd9c2b34eeb4f9 (patch)
treeed8f0d476d3ed2f0ad223941ce2eca2336a938ac
parent008e439f34d4b356825a6c9b70245143f00bd353 (diff)
downloadgcc-af89c7792d722b7c7c2568bd4dfd9c2b34eeb4f9.zip
gcc-af89c7792d722b7c7c2568bd4dfd9c2b34eeb4f9.tar.gz
gcc-af89c7792d722b7c7c2568bd4dfd9c2b34eeb4f9.tar.bz2
libstdc++: Fix some -Wunused-parameter warnings
libstdc++-v3/ChangeLog: * include/bits/alloc_traits.h (allocate): Add [[maybe_unused]] attribute. * include/bits/regex_executor.tcc: Remove name of unused parameter. * include/bits/shared_ptr_atomic.h (atomic_is_lock_free): Likewise. * include/bits/stl_uninitialized.h: Likewise. * include/bits/streambuf_iterator.h (operator==): Likewise. * include/bits/uses_allocator.h: Likewise. * include/c_global/cmath (isfinite, isinf, isnan): Likewise. * include/std/chrono (zoned_time): Likewise. * include/std/future (__future_base::_S_allocate_result): Likewise. (packaged_task): Likewise. * include/std/optional (_Optional_payload_base): Likewise. * include/std/scoped_allocator (__inner_type_impl): Likewise. * include/std/tuple (_Tuple_impl): Likewise.
-rw-r--r--libstdc++-v3/include/bits/alloc_traits.h3
-rw-r--r--libstdc++-v3/include/bits/regex_executor.tcc2
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_atomic.h2
-rw-r--r--libstdc++-v3/include/bits/stl_uninitialized.h3
-rw-r--r--libstdc++-v3/include/bits/streambuf_iterator.h2
-rw-r--r--libstdc++-v3/include/bits/uses_allocator.h2
-rw-r--r--libstdc++-v3/include/c_global/cmath6
-rw-r--r--libstdc++-v3/include/std/chrono4
-rw-r--r--libstdc++-v3/include/std/future4
-rw-r--r--libstdc++-v3/include/std/optional4
-rw-r--r--libstdc++-v3/include/std/scoped_allocator4
-rw-r--r--libstdc++-v3/include/std/tuple16
12 files changed, 26 insertions, 26 deletions
diff --git a/libstdc++-v3/include/bits/alloc_traits.h b/libstdc++-v3/include/bits/alloc_traits.h
index 182c3e2..bc936ec 100644
--- a/libstdc++-v3/include/bits/alloc_traits.h
+++ b/libstdc++-v3/include/bits/alloc_traits.h
@@ -493,7 +493,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
[[__nodiscard__,__gnu__::__always_inline__]]
static _GLIBCXX20_CONSTEXPR pointer
- allocate(allocator_type& __a, size_type __n, const_void_pointer __hint)
+ allocate(allocator_type& __a, size_type __n,
+ [[maybe_unused]] const_void_pointer __hint)
{
#if __cplusplus <= 201703L
return __a.allocate(__n, __hint);
diff --git a/libstdc++-v3/include/bits/regex_executor.tcc b/libstdc++-v3/include/bits/regex_executor.tcc
index 38fbe3d..9643a35 100644
--- a/libstdc++-v3/include/bits/regex_executor.tcc
+++ b/libstdc++-v3/include/bits/regex_executor.tcc
@@ -339,7 +339,7 @@ namespace __detail
template<typename _BiIter, typename _TraitsT>
struct _Backref_matcher
{
- _Backref_matcher(bool __icase, const _TraitsT& __traits)
+ _Backref_matcher(bool /* __icase */, const _TraitsT& __traits)
: _M_traits(__traits) { }
bool
diff --git a/libstdc++-v3/include/bits/shared_ptr_atomic.h b/libstdc++-v3/include/bits/shared_ptr_atomic.h
index 2295b48..3f921d3 100644
--- a/libstdc++-v3/include/bits/shared_ptr_atomic.h
+++ b/libstdc++-v3/include/bits/shared_ptr_atomic.h
@@ -99,7 +99,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
template<typename _Tp, _Lock_policy _Lp>
inline bool
- atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>* __p)
+ atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>*)
{
#ifdef __GTHREADS
return __gthread_active_p() == 0;
diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h
index be7b4afd..474a9a1 100644
--- a/libstdc++-v3/include/bits/stl_uninitialized.h
+++ b/libstdc++-v3/include/bits/stl_uninitialized.h
@@ -806,8 +806,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
template<typename _ForwardIterator>
static void
- __uninit_default_novalue(_ForwardIterator __first,
- _ForwardIterator __last)
+ __uninit_default_novalue(_ForwardIterator, _ForwardIterator)
{
}
};
diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/include/bits/streambuf_iterator.h
index 32285a6..14a95ad 100644
--- a/libstdc++-v3/include/bits/streambuf_iterator.h
+++ b/libstdc++-v3/include/bits/streambuf_iterator.h
@@ -223,7 +223,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus > 201703L && __cpp_lib_concepts
[[nodiscard]]
friend bool
- operator==(const istreambuf_iterator& __i, default_sentinel_t __s)
+ operator==(const istreambuf_iterator& __i, default_sentinel_t)
{ return __i._M_at_eof(); }
#endif
};
diff --git a/libstdc++-v3/include/bits/uses_allocator.h b/libstdc++-v3/include/bits/uses_allocator.h
index d3b26c7..ebd26d2 100644
--- a/libstdc++-v3/include/bits/uses_allocator.h
+++ b/libstdc++-v3/include/bits/uses_allocator.h
@@ -168,7 +168,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif // C++14
template<typename _Tp, typename... _Args>
- void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr,
+ void __uses_allocator_construct_impl(__uses_alloc0, _Tp* __ptr,
_Args&&... __args)
{ ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); }
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath
index b0ba395..caa95e3 100644
--- a/libstdc++-v3/include/c_global/cmath
+++ b/libstdc++-v3/include/c_global/cmath
@@ -1135,7 +1135,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
bool>::__type
- isfinite(_Tp __x)
+ isfinite(_Tp)
{ return true; }
#endif
@@ -1162,7 +1162,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
bool>::__type
- isinf(_Tp __x)
+ isinf(_Tp)
{ return false; }
#endif
@@ -1189,7 +1189,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
bool>::__type
- isnan(_Tp __x)
+ isnan(_Tp)
{ return false; }
#endif
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index 660e8d2..9b16048 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -3039,7 +3039,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Duration2, typename _TimeZonePtr2>
zoned_time(_TimeZonePtr __z,
const zoned_time<_Duration2, _TimeZonePtr2>& __zt,
- choose __c)
+ choose)
requires is_convertible_v<sys_time<_Duration2>, sys_time<_Duration>>
: _M_zone(__z), _M_tp(__zt._M_tp)
{ }
@@ -3057,7 +3057,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Duration2, typename _TimeZonePtr2>
zoned_time(string_view __name,
const zoned_time<_Duration2, _TimeZonePtr2>& __zt,
- choose __c)
+ choose)
requires is_convertible_v<sys_time<_Duration2>, sys_time<_Duration>>
&& requires {
{ _Traits::locate_zone(__name) } -> convertible_to<_TimeZonePtr>;
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index 95b413a..b94ae0b 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -314,7 +314,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Keep it simple for std::allocator.
template<typename _Res, typename _Tp>
static _Ptr<_Result<_Res>>
- _S_allocate_result(const std::allocator<_Tp>& __a)
+ _S_allocate_result(const std::allocator<_Tp>&)
{
return _Ptr<_Result<_Res>>(new _Result<_Res>);
}
@@ -1574,7 +1574,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2095. missing constructors needed for uses-allocator construction
template<typename _Allocator>
- packaged_task(allocator_arg_t, const _Allocator& __a) noexcept
+ packaged_task(allocator_arg_t, const _Allocator&) noexcept
{ }
template<typename _Allocator>
diff --git a/libstdc++-v3/include/std/optional b/libstdc++-v3/include/std/optional
index bcac152..85e814c 100644
--- a/libstdc++-v3/include/std/optional
+++ b/libstdc++-v3/include/std/optional
@@ -138,7 +138,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Constructor used by _Optional_base copy constructor when the
// contained value is not trivially copy constructible.
constexpr
- _Optional_payload_base(bool __engaged,
+ _Optional_payload_base(bool /* __engaged */,
const _Optional_payload_base& __other)
{
if (__other._M_engaged)
@@ -148,7 +148,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Constructor used by _Optional_base move constructor when the
// contained value is not trivially move constructible.
constexpr
- _Optional_payload_base(bool __engaged,
+ _Optional_payload_base(bool /* __engaged */,
_Optional_payload_base&& __other)
{
if (__other._M_engaged)
diff --git a/libstdc++-v3/include/std/scoped_allocator b/libstdc++-v3/include/std/scoped_allocator
index a115450..cb15c8c 100644
--- a/libstdc++-v3/include/std/scoped_allocator
+++ b/libstdc++-v3/include/std/scoped_allocator
@@ -104,11 +104,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__inner_type_impl& operator=(__inner_type_impl&&) = default;
template<typename _Alloc>
- __inner_type_impl(const __inner_type_impl<_Alloc>& __other) noexcept
+ __inner_type_impl(const __inner_type_impl<_Alloc>&) noexcept
{ }
template<typename _Alloc>
- __inner_type_impl(__inner_type_impl<_Alloc>&& __other) noexcept
+ __inner_type_impl(__inner_type_impl<_Alloc>&&) noexcept
{ }
__type&
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
index 0e47abe..c9ea2a8 100644
--- a/libstdc++-v3/include/std/tuple
+++ b/libstdc++-v3/include/std/tuple
@@ -564,14 +564,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc>
_GLIBCXX20_CONSTEXPR
- _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
+ _Tuple_impl(allocator_arg_t, const _Alloc& __a,
const _Head& __head)
: _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), __head)
{ }
template<typename _Alloc, typename _UHead>
_GLIBCXX20_CONSTEXPR
- _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
+ _Tuple_impl(allocator_arg_t, const _Alloc& __a,
_UHead&& __head)
: _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
std::forward<_UHead>(__head))
@@ -579,14 +579,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc>
_GLIBCXX20_CONSTEXPR
- _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
+ _Tuple_impl(allocator_arg_t, const _Alloc& __a,
const _Tuple_impl& __in)
: _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), _M_head(__in))
{ }
template<typename _Alloc>
_GLIBCXX20_CONSTEXPR
- _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
+ _Tuple_impl(allocator_arg_t, const _Alloc& __a,
_Tuple_impl&& __in)
: _Base(__use_alloc<_Head, _Alloc, _Head>(__a),
std::forward<_Head>(_M_head(__in)))
@@ -594,7 +594,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc, typename _UHead>
_GLIBCXX20_CONSTEXPR
- _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
+ _Tuple_impl(allocator_arg_t, const _Alloc& __a,
const _Tuple_impl<_Idx, _UHead>& __in)
: _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a),
_Tuple_impl<_Idx, _UHead>::_M_head(__in))
@@ -602,7 +602,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc, typename _UHead>
_GLIBCXX20_CONSTEXPR
- _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
+ _Tuple_impl(allocator_arg_t, const _Alloc& __a,
_Tuple_impl<_Idx, _UHead>&& __in)
: _Base(__use_alloc<_Head, _Alloc, _UHead>(__a),
std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)))
@@ -611,7 +611,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus > 202002L
template<typename _Alloc, typename _UHead>
constexpr
- _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
+ _Tuple_impl(allocator_arg_t, const _Alloc& __a,
_Tuple_impl<_Idx, _UHead>& __in)
: _Base(__use_alloc<_Head, _Alloc, _UHead&>(__a),
_Tuple_impl<_Idx, _UHead>::_M_head(__in))
@@ -619,7 +619,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc, typename _UHead>
constexpr
- _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
+ _Tuple_impl(allocator_arg_t, const _Alloc& __a,
const _Tuple_impl<_Idx, _UHead>&& __in)
: _Base(__use_alloc<_Head, _Alloc, const _UHead>(__a),
std::forward<const _UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)))