diff --git a/libusb/os/windows_nt_common.c b/libusb/os/windows_nt_common.c index ad17678..92dbde5 100644 --- a/libusb/os/windows_nt_common.c +++ b/libusb/os/windows_nt_common.c @@ -729,9 +729,10 @@ static int windows_set_option(struct libusb_context *ctx, enum libusb_option opt return LIBUSB_ERROR_NOT_FOUND; } return LIBUSB_SUCCESS; + default: + return LIBUSB_ERROR_NOT_SUPPORTED; } - return LIBUSB_ERROR_NOT_SUPPORTED; } static int windows_get_device_list(struct libusb_context *ctx, struct discovered_devs **discdevs) diff --git a/libusb/os/windows_usbdk.c b/libusb/os/windows_usbdk.c index 089e2a5..6b16675 100644 --- a/libusb/os/windows_usbdk.c +++ b/libusb/os/windows_usbdk.c @@ -496,13 +496,11 @@ static int usbdk_do_control_transfer(struct usbi_transfer *itransfer) struct usbdk_transfer_priv *transfer_priv = _usbdk_transfer_priv(itransfer); struct libusb_context *ctx = TRANSFER_CTX(transfer); OVERLAPPED *overlapped = transfer_priv->pollable_fd.overlapped; - ULONG Length; TransferResult transResult; transfer_priv->request.Buffer = (PVOID64)transfer->buffer; transfer_priv->request.BufferLength = transfer->length; transfer_priv->request.TransferType = ControlTransferType; - Length = (ULONG)transfer->length; if (transfer->buffer[0] & LIBUSB_ENDPOINT_IN) transResult = usbdk_helper.ReadPipe(priv->redirector_handle, &transfer_priv->request, overlapped); diff --git a/libusb/os/windows_usbdk.h b/libusb/os/windows_usbdk.h index 0de2675..77660ae 100644 --- a/libusb/os/windows_usbdk.h +++ b/libusb/os/windows_usbdk.h @@ -25,12 +25,6 @@ #include "windows_nt_common.h" -static inline void UsbDkFillIDStruct(USB_DK_DEVICE_ID *ID, const WCHAR *DeviceID, const WCHAR *InstanceID) -{ - wcsncpy(ID->DeviceID, DeviceID, MAX_DEVICE_ID_LEN); - wcsncpy(ID->InstanceID, InstanceID, MAX_DEVICE_ID_LEN); -} - typedef struct USB_DK_CONFIG_DESCRIPTOR_REQUEST { USB_DK_DEVICE_ID ID; ULONG64 Index; diff --git a/libusb/version_nano.h b/libusb/version_nano.h index ea7dafb..796ce88 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11284 +#define LIBUSB_NANO 11285