[COMMITTED] malloc: Fix malloc/tst-mallocfork3.c on clang-23

Adhemerval Zanella adhemerval.zanella@linaro.org
Wed Aug 12 18:21:43 GMT 2026


clang-23 enables -Wunused-but-set-global by default, which flags
variables that are set but never read.
---
 malloc/tst-mallocfork3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/malloc/tst-mallocfork3.c b/malloc/tst-mallocfork3.c
index 4a46c87fa35..0e18fead046 100644
--- a/malloc/tst-mallocfork3.c
+++ b/malloc/tst-mallocfork3.c
@@ -128,7 +128,6 @@ signal_sender (void *args)
 }
 
 static pthread_t sigusr1_sender[5];
-static pthread_t sigusr2_sender;
 
 static int
 do_test (void)
@@ -139,7 +138,7 @@ do_test (void)
   pthread_t self = pthread_self ();
 
   struct signal_send_args sigusr2_args = { self, SIGUSR2, true };
-  sigusr2_sender = xpthread_create (NULL, signal_sender, &sigusr2_args);
+  xpthread_create (NULL, signal_sender, &sigusr2_args);
 
   /* Send SIGUSR1 signals from several threads.  Hopefully, one
      signal will hit one of the critical functions.  Use a barrier to
-- 
2.53.0



More information about the Libc-alpha mailing list