[close] Attachments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #100: 0003-fixed-ticket-100-compiler-warning-casting-int-to-poi.patch

File 0003-fixed-ticket-100-compiler-warning-casting-int-to-poi.patch, 1.4 KB (added by rogueresearch, 2 years ago)
  • libusb/os/darwin_usb.c

    From ee80876dc07a9e89475a075ba821db436b1c3025 Mon Sep 17 00:00:00 2001
    From: Sean McBride <sean@rogue-research.com>
    Date: Fri, 11 Feb 2011 11:28:04 -0500
    Subject: [PATCH 3/3] fixed ticket #100, compiler warning casting int to pointer of different size
    
    ---
     libusb/os/darwin_usb.c |    7 +++----
     1 files changed, 3 insertions(+), 4 deletions(-)
    
    diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
    index a44599b..8d4b6a6 100644
    a b static void *event_thread_main (void *arg0) { 
    305305  if (kresult != kIOReturnSuccess) { 
    306306    usbi_err (ctx, "could not add hotplug event source: %s", darwin_error_str (kresult)); 
    307307 
    308     pthread_exit ((void *)kresult); 
     308    pthread_exit (NULL); 
    309309  } 
    310310 
    311311  /* arm notifiers */ 
    static void *event_thread_main (void *arg0) { 
    329329 
    330330  libusb_darwin_acfl = NULL; 
    331331 
    332   pthread_exit (0); 
     332  pthread_exit (NULL); 
    333333} 
    334334 
    335335static int darwin_init(struct libusb_context *ctx) { 
    static int darwin_init(struct libusb_context *ctx) { 
    355355 
    356356static void darwin_exit (void) { 
    357357  if (!(--initCount)) { 
    358     void *ret; 
    359358 
    360359    /* stop the async runloop */ 
    361360    CFRunLoopStop (libusb_darwin_acfl); 
    362     pthread_join (libusb_darwin_at, &ret); 
     361    pthread_join (libusb_darwin_at, NULL); 
    363362 
    364363    if (libusb_darwin_mp) 
    365364      mach_port_deallocate(mach_task_self(), libusb_darwin_mp);