--- a/tests/cleanup1.c
+++ b/tests/cleanup1.c
@@ -146,7 +146,7 @@
 #pragma inline_depth()
 #endif
 
-  return (void *) result;
+  return (void *) (size_t)result;
 }
 
 int
@@ -205,7 +205,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 != (int) PTHREAD_CANCELED);