diff options
author | Ludovic Rousseau <ludovic.rousseau@gmail.com> | 2012-10-13 20:22:49 +0200 |
---|---|---|
committer | Ludovic Rousseau <ludovic.rousseau+github@gmail.com> | 2013-02-15 11:16:33 +0100 |
commit | bfd02c6f59f11a6af8cc9e6af96f4942cc37a5f4 (patch) | |
tree | a732e49d649535677e9b539956997f93e07a4304 | |
parent | e39b24ae5a6069b1571ecef3eb510c9e90db4956 (diff) | |
download | libusb-bfd02c6f59f11a6af8cc9e6af96f4942cc37a5f4.tar.gz |
Core: Fix compiler warning
libusb/io.c:1877:35: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
timeout_ms = (tv->tv_sec * 1000) + (tv->tv_usec / 1000);
~ ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
On Mac OS X tv_sec is a __darwin_time_t which is a long, not an int.
-rw-r--r-- | libusb/io.c | 2 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libusb/io.c b/libusb/io.c index 7631bed..58c077c 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -1878,7 +1878,7 @@ static int handle_events(struct libusb_context *ctx, struct timeval *tv) } usbi_mutex_unlock(&ctx->pollfds_lock); - timeout_ms = (tv->tv_sec * 1000) + (tv->tv_usec / 1000); + timeout_ms = (int)(tv->tv_sec * 1000) + (tv->tv_usec / 1000); /* round up to next millisecond */ if (tv->tv_usec % 1000) diff --git a/libusb/version_nano.h b/libusb/version_nano.h index b5f9988..b92e4fe 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10605 +#define LIBUSB_NANO 10606 |