Darwin: Fix #100 warning cast to pointer from integer of different size
authorSean McBride <sean@rogue-research.com>
Fri, 11 Feb 2011 16:28:04 +0000 (11:28 -0500)
committerPeter Stuge <peter@stuge.se>
Sun, 24 Jul 2011 20:29:09 +0000 (22:29 +0200)
libusb/os/darwin_usb.c

index 912b65c..e7318d8 100644 (file)
@@ -301,7 +301,7 @@ static void *event_thread_main (void *arg0) {
   if (kresult != kIOReturnSuccess) {
     usbi_err (ctx, "could not add hotplug event source: %s", darwin_error_str (kresult));
 
-    pthread_exit ((void *)kresult);
+    pthread_exit (NULL);
   }
 
   /* arm notifiers */
@@ -325,7 +325,7 @@ static void *event_thread_main (void *arg0) {
 
   libusb_darwin_acfl = NULL;
 
-  pthread_exit (0);
+  pthread_exit (NULL);
 }
 
 static int darwin_init(struct libusb_context *ctx) {
@@ -351,11 +351,10 @@ static int darwin_init(struct libusb_context *ctx) {
 
 static void darwin_exit (void) {
   if (!(--initCount)) {
-    void *ret;
 
     /* stop the async runloop */
     CFRunLoopStop (libusb_darwin_acfl);
-    pthread_join (libusb_darwin_at, &ret);
+    pthread_join (libusb_darwin_at, NULL);
 
     if (libusb_darwin_mp)
       mach_port_deallocate(mach_task_self(), libusb_darwin_mp);