From 3893c4fcc92765cfa934e8762b7951fe8648ef7e Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 8 May 2014 21:19:45 +0100 Subject: Windows: Fix broken WDK compilation * void function call was returning a value * introduced in 6d8dfe0aee41a3c7dd862c3de488df3ce452d86e * also fix whitespaces --- libusb/os/windows_usb.c | 27 ++++++++++++++------------- libusb/version_nano.h | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 515ddb1..7f4f315 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -1553,7 +1553,7 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered parent_priv = _device_priv(parent_dev); // virtual USB devices are also listed during GEN - don't process these yet if ( (pass == GEN_PASS) && (parent_priv->apib->id != USB_API_HUB) ) { - libusb_unref_device(parent_dev); + libusb_unref_device(parent_dev); continue; } break; @@ -1580,16 +1580,16 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered usbi_dbg("found existing device for session [%X] (%d.%d)", session_id, dev->bus_number, dev->device_address); } - // Keep track of devices that need unref - unref_list[unref_cur++] = dev; - if (unref_cur >= unref_size) { - unref_size += 64; - unref_list = usbi_reallocf(unref_list, unref_size*sizeof(libusb_device*)); - if (unref_list == NULL) { - usbi_err(ctx, "could not realloc list for unref - aborting."); - LOOP_BREAK(LIBUSB_ERROR_NO_MEM); - } - } + // Keep track of devices that need unref + unref_list[unref_cur++] = dev; + if (unref_cur >= unref_size) { + unref_size += 64; + unref_list = usbi_reallocf(unref_list, unref_size*sizeof(libusb_device*)); + if (unref_list == NULL) { + usbi_err(ctx, "could not realloc list for unref - aborting."); + LOOP_BREAK(LIBUSB_ERROR_NO_MEM); + } + } priv = _device_priv(dev); } @@ -1675,7 +1675,7 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered break; } } - libusb_unref_device(parent_dev); + libusb_unref_device(parent_dev); break; } } @@ -2116,7 +2116,8 @@ static void windows_handle_callback (struct usbi_transfer *itransfer, uint32_t i windows_transfer_callback (itransfer, io_result, io_size); break; case LIBUSB_TRANSFER_TYPE_BULK_STREAM: - return LIBUSB_ERROR_NOT_SUPPORTED; + usbi_warn(ITRANSFER_CTX(itransfer), "bulk stream transfers are not yet supported on this platform"); + break; default: usbi_err(ITRANSFER_CTX(itransfer), "unknown endpoint type %d", transfer->type); } diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 51c00b2..ea3ff7c 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10885 +#define LIBUSB_NANO 10886 -- cgit v1.2.1