[glibc/azanella/clang] nptl: Fix Wincompatible-pointer-types on clang

Adhemerval Zanella azanella@sourceware.org
Fri Oct 28 17:38:52 GMT 2022


https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2373d72259a062d550947bb86f146c601141f190

commit 2373d72259a062d550947bb86f146c601141f190
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Mar 9 16:17:43 2022 -0300

    nptl: Fix Wincompatible-pointer-types on clang
    
    Clang issues:
    
    error: incompatible pointer types passing 'struct pthread **' to
    parameter of type 'void **' [-Werror,-Wincompatible-pointer-types]

Diff:
---
 nptl/pthread_join_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nptl/pthread_join_common.c b/nptl/pthread_join_common.c
index ca3245b0af..a4a528c40b 100644
--- a/nptl/pthread_join_common.c
+++ b/nptl/pthread_join_common.c
@@ -29,7 +29,7 @@ cleanup (void *arg)
      fail for any reason but the thread not having done that yet so
      there is no reason for a loop.  */
   struct pthread *self = THREAD_SELF;
-  atomic_compare_exchange_weak_acquire (&arg, &self, NULL);
+  atomic_compare_exchange_weak_acquire (&arg, (void **) &self, NULL);
 }
 
 int


More information about the Glibc-cvs mailing list