From 6a445e6a0c07d05475cbb20632dba9297e372b43 Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Fri, 26 Oct 2012 10:02:16 +0200 Subject: [PATCH] Core: Fix warning implicit conversion changes signedness * Closes #70 --- libusb/io.c | 9 +++++---- libusb/version_nano.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libusb/io.c b/libusb/io.c index c222451..789bd68 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -1534,14 +1534,15 @@ int usbi_handle_transfer_cancellation(struct usbi_transfer *transfer) int API_EXPORTED libusb_try_lock_events(libusb_context *ctx) { int r; + unsigned int ru; USBI_GET_CONTEXT(ctx); /* is someone else waiting to modify poll fds? if so, don't let this thread * start event handling */ usbi_mutex_lock(&ctx->pollfd_modify_lock); - r = ctx->pollfd_modify; + ru = ctx->pollfd_modify; usbi_mutex_unlock(&ctx->pollfd_modify_lock); - if (r) { + if (ru) { usbi_dbg("someone else is modifying poll fds"); return 1; } @@ -1624,7 +1625,7 @@ void API_EXPORTED libusb_unlock_events(libusb_context *ctx) */ int API_EXPORTED libusb_event_handling_ok(libusb_context *ctx) { - int r; + unsigned int r; USBI_GET_CONTEXT(ctx); /* is someone else waiting to modify poll fds? if so, don't let this thread @@ -1652,7 +1653,7 @@ int API_EXPORTED libusb_event_handling_ok(libusb_context *ctx) */ int API_EXPORTED libusb_event_handler_active(libusb_context *ctx) { - int r; + unsigned int r; USBI_GET_CONTEXT(ctx); /* is someone else waiting to modify poll fds? if so, don't let this thread diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 7f14aa2..64f61c5 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10599 +#define LIBUSB_NANO 10600 -- 2.11.4.GIT