--- a/tests/cleanup3.c
+++ b/tests/cleanup3.c
@@ -136,7 +136,7 @@
 #pragma inline_depth()
 #endif
 
-  return (void *) result;
+  return (void *) (size_t)result;
 }
 
 int
@@ -185,7 +185,7 @@
       int fail = 0;
       int result = 0;
 
-      assert(pthread_join(t[i], (void **) &result) == 0);
+      assert(pthread_join(t[i], (void *) &result) == 0);
 
       fail = (result != 0);