Fix unused parameter warnings
authorSean McBride <sean@rogue-research.com>
Thu, 28 Dec 2017 03:32:15 +0000 (22:32 -0500)
committerChris Dickens <christopher.a.dickens@gmail.com>
Fri, 29 Dec 2017 06:40:30 +0000 (22:40 -0800)
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
examples/dpfp.c
examples/dpfp_threaded.c
examples/hotplugtest.c
libusb/os/darwin_usb.c
libusb/version_nano.h

index ed68267..b23a8fc 100644 (file)
@@ -411,6 +411,8 @@ static int alloc_transfers(void)
 
 static void sighandler(int signum)
 {
+       (void)signum;
+
        do_exit = 1;
 }
 
index d745312..ee6aad0 100644 (file)
@@ -84,6 +84,8 @@ static void *poll_thread_main(void *arg)
        int r = 0;
        printf("poll thread running\n");
 
+       (void)arg;
+
        while (!do_exit) {
                struct timeval tv = { 1, 0 };
                r = libusb_handle_events_timeout(NULL, &tv);
@@ -441,6 +443,8 @@ static int alloc_transfers(void)
 
 static void sighandler(int signum)
 {
+       (void)signum;
+
        request_exit(1);
 }
 
index cc873f1..4d0db5e 100644 (file)
@@ -31,6 +31,11 @@ static int LIBUSB_CALL hotplug_callback(libusb_context *ctx, libusb_device *dev,
        struct libusb_device_descriptor desc;
        int rc;
 
+       (void)ctx;
+       (void)dev;
+       (void)event;
+       (void)user_data;
+
        rc = libusb_get_device_descriptor(dev, &desc);
        if (LIBUSB_SUCCESS != rc) {
                fprintf (stderr, "Error getting device descriptor\n");
@@ -55,6 +60,11 @@ static int LIBUSB_CALL hotplug_callback(libusb_context *ctx, libusb_device *dev,
 
 static int LIBUSB_CALL hotplug_callback_detach(libusb_context *ctx, libusb_device *dev, libusb_hotplug_event event, void *user_data)
 {
+       (void)ctx;
+       (void)dev;
+       (void)event;
+       (void)user_data;
+
        printf ("Device detached\n");
 
        if (handle) {
index 9946222..8277dd2 100644 (file)
@@ -305,6 +305,7 @@ static usb_device_t **darwin_device_from_service (io_service_t service)
 }
 
 static void darwin_devices_attached (void *ptr, io_iterator_t add_devices) {
+  UNUSED(ptr);
   struct libusb_context *ctx;
   io_service_t service;
 
@@ -323,6 +324,7 @@ static void darwin_devices_attached (void *ptr, io_iterator_t add_devices) {
 }
 
 static void darwin_devices_detached (void *ptr, io_iterator_t rem_devices) {
+  UNUSED(ptr);
   struct libusb_device *dev = NULL;
   struct libusb_context *ctx;
   struct darwin_cached_device *old_device;
index fcff7b6..c860c58 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11234
+#define LIBUSB_NANO 11235