summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2019-01-17 17:28:59 -0500
committerLudovic Rousseau <ludovic.rousseau@free.fr>2019-02-08 18:54:54 +0100
commit2a7372db54094a406a755f0b8548b614ba8c78ec (patch)
treeae9b7504260d4b910e7fb7ef3550a69445034471
parent8cfcc63f4f970ca3bbdd9bf77b3bb20d78b9e855 (diff)
downloadlibusb-2a7372db54094a406a755f0b8548b614ba8c78ec.tar.gz
Fixed -Wformat warnings by casting intptr_t to void*
%p is for pointers, not integers; therefore added a cast. Fixes the following warnings: libusb/core.c:1252:33: Format specifies type 'void *' but the argument has type 'intptr_t' (aka 'long') libusb/core.c:1276:45: Format specifies type 'void *' but the argument has type 'intptr_t' (aka 'long') Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr>
-rw-r--r--libusb/core.c4
-rw-r--r--libusb/version_nano.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/libusb/core.c b/libusb/core.c
index 2d3bf5b..171918d 100644
--- a/libusb/core.c
+++ b/libusb/core.c
@@ -1249,7 +1249,7 @@ int API_EXPORTED libusb_wrap_sys_device(libusb_context *ctx, intptr_t sys_dev,
struct libusb_device_handle *_dev_handle;
size_t priv_size = usbi_backend.device_handle_priv_size;
int r;
- usbi_dbg("wrap_sys_device %p", sys_dev);
+ usbi_dbg("wrap_sys_device %p", (void *)sys_dev);
USBI_GET_CONTEXT(ctx);
@@ -1273,7 +1273,7 @@ int API_EXPORTED libusb_wrap_sys_device(libusb_context *ctx, intptr_t sys_dev,
r = usbi_backend.wrap_sys_device(ctx, _dev_handle, sys_dev);
if (r < 0) {
- usbi_dbg("wrap_sys_device %p returns %d", sys_dev, r);
+ usbi_dbg("wrap_sys_device %p returns %d", (void *)sys_dev, r);
usbi_mutex_destroy(&_dev_handle->lock);
free(_dev_handle);
return r;
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 3921d0b..c308dff 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11346
+#define LIBUSB_NANO 11347