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 /libusb/io.c | |
parent | e39b24ae5a6069b1571ecef3eb510c9e90db4956 (diff) | |
download | android_external_libusbx-bfd02c6f59f11a6af8cc9e6af96f4942cc37a5f4.tar.gz android_external_libusbx-bfd02c6f59f11a6af8cc9e6af96f4942cc37a5f4.tar.bz2 android_external_libusbx-bfd02c6f59f11a6af8cc9e6af96f4942cc37a5f4.zip |
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.
Diffstat (limited to 'libusb/io.c')
-rw-r--r-- | libusb/io.c | 2 |
1 files changed, 1 insertions, 1 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) |