Windows: Fix MinGW build warnings/errors

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
This commit is contained in:
Chris Dickens
2018-01-08 12:31:55 -08:00
parent 678a43bcf3
commit d88c58eb5b
4 changed files with 3 additions and 10 deletions
+2 -1
View File
@@ -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)
-2
View File
@@ -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);
-6
View File
@@ -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;
+1 -1
View File
@@ -1 +1 @@
#define LIBUSB_NANO 11284
#define LIBUSB_NANO 11285