diff options
author | hjelmn <Nathan Hjelm hjelmn@cs.unm.edu> | 2013-07-30 13:28:27 -0600 |
---|---|---|
committer | hjelmn <Nathan Hjelm hjelmn@cs.unm.edu> | 2013-07-30 13:33:01 -0600 |
commit | b5acea3591ee713ec3392e8d3c8ba59e848d8641 (patch) | |
tree | 79c6e1e3cd93cb72cb5ed15ea226a817642f7fa2 | |
parent | 4cb9ae0c22c576298fb182868d765bcae6e1993a (diff) | |
download | libusb-b5acea3591ee713ec3392e8d3c8ba59e848d8641.tar.gz |
darwin: fix clang warnings about explicit conversion
There shouldn't be any problems with any supported version of OSX in
converting a UInt64 to an unsigned long. They should be the same size
but even if they are not the session should still be unique.
-rw-r--r-- | libusb/os/darwin_usb.c | 6 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c index d7f15a5..b0ee5b2 100644 --- a/libusb/os/darwin_usb.c +++ b/libusb/os/darwin_usb.c @@ -288,7 +288,7 @@ static void darwin_devices_detached (void *ptr, io_iterator_t rem_devices) { list_for_each_entry(ctx, &active_contexts_list, list, struct libusb_context) { usbi_dbg ("notifying context %p of device disconnect", ctx); - dev = usbi_get_device_by_session_id(ctx, session); + dev = usbi_get_device_by_session_id(ctx, (unsigned long) session); if (dev) { /* signal the core that this device has been disconnected. the core will tear down this device when the reference count reaches 0 */ @@ -847,7 +847,7 @@ static int process_new_device (struct libusb_context *ctx, io_service_t service) usbi_dbg ("allocating new device in context %p for with session 0x%08x", ctx, cached_device->session); - dev = usbi_alloc_device(ctx, cached_device->session); + dev = usbi_alloc_device(ctx, (unsigned long) cached_device->session); if (!dev) { return LIBUSB_ERROR_NO_MEM; } @@ -858,7 +858,7 @@ static int process_new_device (struct libusb_context *ctx, io_service_t service) darwin_ref_cached_device (priv->dev); if (cached_device->parent_session > 0) { - dev->parent_dev = usbi_get_device_by_session_id (ctx, cached_device->parent_session); + dev->parent_dev = usbi_get_device_by_session_id (ctx, (unsigned long) cached_device->parent_session); } else { dev->parent_dev = NULL; } diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 12ab9bf..7176abc 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10796 +#define LIBUSB_NANO 10797 |