From 830a9cb27de66458850fa6eccc115c0dea4c138b Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Wed, 27 Dec 2017 22:32:15 -0500 Subject: [PATCH] Fix unused parameter warnings Signed-off-by: Chris Dickens --- examples/dpfp.c | 2 ++ examples/dpfp_threaded.c | 4 ++++ examples/hotplugtest.c | 10 ++++++++++ libusb/os/darwin_usb.c | 2 ++ libusb/version_nano.h | 2 +- 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/examples/dpfp.c b/examples/dpfp.c index ed68267..b23a8fc 100644 --- a/examples/dpfp.c +++ b/examples/dpfp.c @@ -411,6 +411,8 @@ static int alloc_transfers(void) static void sighandler(int signum) { + (void)signum; + do_exit = 1; } diff --git a/examples/dpfp_threaded.c b/examples/dpfp_threaded.c index d745312..ee6aad0 100644 --- a/examples/dpfp_threaded.c +++ b/examples/dpfp_threaded.c @@ -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); } diff --git a/examples/hotplugtest.c b/examples/hotplugtest.c index cc873f1..4d0db5e 100644 --- a/examples/hotplugtest.c +++ b/examples/hotplugtest.c @@ -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) { diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c index 9946222..8277dd2 100644 --- a/libusb/os/darwin_usb.c +++ b/libusb/os/darwin_usb.c @@ -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; diff --git a/libusb/version_nano.h b/libusb/version_nano.h index fcff7b6..c860c58 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11234 +#define LIBUSB_NANO 11235 -- 2.7.4