summaryrefslogtreecommitdiff
path: root/libusb/libusb.h
diff options
context:
space:
mode:
authorMichael Plante <michael.plante@gmail.com>2010-08-02 19:59:12 -0500
committerPeter Stuge <peter@stuge.se>2012-02-08 14:46:17 +0100
commitbb37939ab44a54a054f73e2f381808b12fb9cb33 (patch)
treef7782dae58bccd850ad399e1b7f6b40ed8c543d2 /libusb/libusb.h
parentca09754471acba9a22fe8fc09170e5660d1d5c5d (diff)
downloadlibusb-bb37939ab44a54a054f73e2f381808b12fb9cb33.tar.gz
libusb.h: Cast in libusb_get_string_descriptor() to avoid MSVC6 warning
On MSVC6 bitwise OR promotes to int, causing the warning.
Diffstat (limited to 'libusb/libusb.h')
-rw-r--r--libusb/libusb.h2
1 files changed, 1 insertions, 1 deletions
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);
}