]> Savannah Git Hosting - gnulib.git/commitdiff
pthread-rwlock tests: Fix compilation error on AIX with xlc.
authorBruno Haible <bruno@clisp.org>
Thu, 14 Nov 2024 06:06:25 +0000 (07:06 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 14 Nov 2024 06:06:25 +0000 (07:06 +0100)
* m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Cast the NULL pointer.
* tests/test-pthread-rwlock-waitqueue.c (do_test): Likewise.

ChangeLog
m4/pthread-rwlock.m4
tests/test-pthread-rwlock-waitqueue.c

index 6e44c146481fbbae06ea16eb507a898da59dc104..ae9f13aaaee45b21af8adb7a73a624f1e3e72d76 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-11-14  Bruno Haible  <bruno@clisp.org>
+
+       pthread-rwlock tests: Fix compilation error on AIX with xlc.
+       * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Cast the NULL pointer.
+       * tests/test-pthread-rwlock-waitqueue.c (do_test): Likewise.
+
 2024-11-14  Bruno Haible  <bruno@clisp.org>
 
        ftello: Add tests for large files.
index 31bda46ea17b8c09db856b12248fdf6ef40036df..084697df803a323ab20ad61655cf41676045c7e5 100644 (file)
@@ -1,5 +1,5 @@
 # pthread-rwlock.m4
-# serial 7
+# serial 8
 dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -267,7 +267,7 @@ do_test (const char *rw_string)
       err = pthread_create (&threads[i], NULL,
                             rw_string[i] == 'R' ? reader_func :
                             rw_string[i] == 'W' ? writer_func :
-                            (abort (), NULL),
+                            (abort (), (void * (*) (void *)) NULL),
                             &locals[i]);
       if (err)
         {
index 6b800ea5cc287ea2ff2d99b5c768648eeb4dc6a6..f34ed36e14559b5c313c4cdd733ba1c55178c664 100644 (file)
@@ -198,7 +198,7 @@ do_test (const char *rw_string)
       err = pthread_create (&threads[i], NULL,
                             rw_string[i] == 'R' ? reader_func :
                             rw_string[i] == 'W' ? writer_func :
-                            (abort (), NULL),
+                            (abort (), (void * (*) (void *)) NULL),
                             &locals[i]);
       if (err)
         {