--- a/tests/cancel6a.c
+++ b/tests/cancel6a.c
@@ -105,7 +105,7 @@
   for (bag->count = 0; bag->count < 100; bag->count++)
     Sleep(100);
 
-  return (void *) result;
+  return (void *) (size_t)result;
 }
 
 int
@@ -168,7 +168,7 @@
        * a return value of PTHREAD_CANCELED confirms that async
        * cancelation succeeded.
        */
-      assert(pthread_join(t[i], (void **) &result) == 0);
+      assert(pthread_join(t[i], (void *) &result) == 0);
 
       fail = (result != (int) PTHREAD_CANCELED);