Removed unneeded casts
authorSean McBride <sean@rogue-research.com>
Tue, 22 Apr 2014 20:52:29 +0000 (16:52 -0400)
committerNathan Hjelm <hjelmn@me.com>
Tue, 6 May 2014 07:28:08 +0000 (01:28 -0600)
The parameters already match the function declaration; no need to cast.

libusb/os/darwin_usb.c
libusb/version_nano.h

index 5963965..b66fe80 100644 (file)
@@ -346,8 +346,8 @@ static void *darwin_event_thread_main (void *arg0) {
   /* create notifications for removed devices */
   kresult = IOServiceAddMatchingNotification (libusb_notification_port, kIOTerminatedNotification,
                                               IOServiceMatching(kIOUSBDeviceClassName),
-                                              (IOServiceMatchingCallback)darwin_devices_detached,
-                                              (void *)ctx, &libusb_rem_device_iterator);
+                                              darwin_devices_detached,
+                                              ctx, &libusb_rem_device_iterator);
 
   if (kresult != kIOReturnSuccess) {
     usbi_err (ctx, "could not add hotplug event source: %s", darwin_error_str (kresult));
@@ -358,8 +358,8 @@ static void *darwin_event_thread_main (void *arg0) {
   /* create notifications for attached devices */
   kresult = IOServiceAddMatchingNotification(libusb_notification_port, kIOFirstMatchNotification,
                                               IOServiceMatching(kIOUSBDeviceClassName),
-                                              (IOServiceMatchingCallback)darwin_devices_attached,
-                                              (void *)ctx, &libusb_add_device_iterator);
+                                              darwin_devices_attached,
+                                              ctx, &libusb_add_device_iterator);
 
   if (kresult != kIOReturnSuccess) {
     usbi_err (ctx, "could not add hotplug event source: %s", darwin_error_str (kresult));
@@ -429,7 +429,7 @@ static int darwin_init(struct libusb_context *ctx) {
     host_get_clock_service(host_self, SYSTEM_CLOCK, &clock_monotonic);
     mach_port_deallocate(mach_task_self(), host_self);
 
-    pthread_create (&libusb_darwin_at, NULL, darwin_event_thread_main, (void *)ctx);
+    pthread_create (&libusb_darwin_at, NULL, darwin_event_thread_main, ctx);
 
     pthread_mutex_lock (&libusb_darwin_at_mutex);
     while (!libusb_darwin_acfl)
index 3f71231..82c1717 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 10880
+#define LIBUSB_NANO 10881