[committed] libstdc++: Fix unused parameter warnings in <bits/atomic_futex.h>

Message ID 20250110210745.829883-1-jwakely@redhat.com
State New
Headers
Series [committed] libstdc++: Fix unused parameter warnings in <bits/atomic_futex.h> |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply

Commit Message

Jonathan Wakely Jan. 10, 2025, 9:07 p.m. UTC
  This fixes warnings like the following during bootstrap:

sparc-sun-solaris2.11/libstdc++-v3/include/bits/atomic_futex.h:324:53: warning: unused parameter ‘__mo’ [-Wunused-parameter]
  324 |     _M_load_when_equal(unsigned __val, memory_order __mo)
      |                                        ~~~~~~~~~~~~~^~~~

libstdc++-v3/ChangeLog:

	* include/bits/atomic_futex.h (__atomic_futex_unsigned): Remove
	names of unused parameters in non-futex implementation.
---

Bootstrapped on sparc-solaris, tested on x86_64-linux.

Pushed to trunk.

 libstdc++-v3/include/bits/atomic_futex.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
  

Patch

diff --git a/libstdc++-v3/include/bits/atomic_futex.h b/libstdc++-v3/include/bits/atomic_futex.h
index e69420d23055..9326cba67153 100644
--- a/libstdc++-v3/include/bits/atomic_futex.h
+++ b/libstdc++-v3/include/bits/atomic_futex.h
@@ -305,14 +305,14 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     { }
 
     _GLIBCXX_ALWAYS_INLINE unsigned
-    _M_load(memory_order __mo)
+    _M_load(memory_order)
     {
       unique_lock<mutex> __lock(_M_mutex);
       return _M_data;
     }
 
     _GLIBCXX_ALWAYS_INLINE unsigned
-    _M_load_when_not_equal(unsigned __val, memory_order __mo)
+    _M_load_when_not_equal(unsigned __val, memory_order)
     {
       unique_lock<mutex> __lock(_M_mutex);
       while (_M_data == __val)
@@ -321,7 +321,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     }
 
     _GLIBCXX_ALWAYS_INLINE void
-    _M_load_when_equal(unsigned __val, memory_order __mo)
+    _M_load_when_equal(unsigned __val, memory_order)
     {
       unique_lock<mutex> __lock(_M_mutex);
       while (_M_data != __val)
@@ -330,7 +330,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
     template<typename _Rep, typename _Period>
       _GLIBCXX_ALWAYS_INLINE bool
-      _M_load_when_equal_for(unsigned __val, memory_order __mo,
+      _M_load_when_equal_for(unsigned __val, memory_order,
 	  const chrono::duration<_Rep, _Period>& __rtime)
       {
 	unique_lock<mutex> __lock(_M_mutex);
@@ -340,7 +340,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
     template<typename _Clock, typename _Duration>
       _GLIBCXX_ALWAYS_INLINE bool
-      _M_load_when_equal_until(unsigned __val, memory_order __mo,
+      _M_load_when_equal_until(unsigned __val, memory_order,
 	  const chrono::time_point<_Clock, _Duration>& __atime)
       {
 	unique_lock<mutex> __lock(_M_mutex);
@@ -349,7 +349,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       }
 
     _GLIBCXX_ALWAYS_INLINE void
-    _M_store_notify_all(unsigned __val, memory_order __mo)
+    _M_store_notify_all(unsigned __val, memory_order)
     {
       unique_lock<mutex> __lock(_M_mutex);
       _M_data = __val;