From bb37939ab44a54a054f73e2f381808b12fb9cb33 Mon Sep 17 00:00:00 2001 From: Michael Plante Date: Mon, 2 Aug 2010 19:59:12 -0500 Subject: libusb.h: Cast in libusb_get_string_descriptor() to avoid MSVC6 warning On MSVC6 bitwise OR promotes to int, causing the warning. --- libusb/libusb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libusb/libusb.h b/libusb/libusb.h index 85b98d1..ba1104d 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -1313,7 +1313,7 @@ static inline int libusb_get_string_descriptor(libusb_device_handle *dev, uint8_t desc_index, uint16_t langid, unsigned char *data, int length) { return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN, - LIBUSB_REQUEST_GET_DESCRIPTOR, (LIBUSB_DT_STRING << 8) | desc_index, + LIBUSB_REQUEST_GET_DESCRIPTOR, (uint16_t)((LIBUSB_DT_STRING << 8) | desc_index), langid, data, (uint16_t) length, 1000); } -- cgit v1.2.1