summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2017-12-27 22:32:15 -0500
committerChris Dickens <christopher.a.dickens@gmail.com>2017-12-28 22:40:30 -0800
commit830a9cb27de66458850fa6eccc115c0dea4c138b (patch)
treeeeb1cf220157e14075c19fe5ee25f718963f429c
parent8e1a282583dbdc9debb69349e626cf0d66c5027c (diff)
downloadlibusb-830a9cb27de66458850fa6eccc115c0dea4c138b.tar.gz
Fix unused parameter warnings
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
-rw-r--r--examples/dpfp.c2
-rw-r--r--examples/dpfp_threaded.c4
-rw-r--r--examples/hotplugtest.c10
-rw-r--r--libusb/os/darwin_usb.c2
-rw-r--r--libusb/version_nano.h2
5 files changed, 19 insertions, 1 deletions
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