summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2011-11-15 01:26:31 +0000
committerPete Batard <pete@akeo.ie>2011-11-15 01:26:31 +0000
commit554274a9c53194989ed0ab4c04aeb7f72d6ca183 (patch)
tree0ea989260e6a73c51b071994d4c90e77408e929e /examples
parent67826b8f80dd5c0d2fdb10ce238db25d1659bb3b (diff)
downloadlibusb-554274a9c53194989ed0ab4c04aeb7f72d6ca183.tar.gz
[xusb] fix additional MSVC6 errors and warnings
* warning C4761: integral size mismatch in argument;
Diffstat (limited to 'examples')
-rw-r--r--examples/xusb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/xusb.c b/examples/xusb.c
index bb9d6ed..db50280 100644
--- a/examples/xusb.c
+++ b/examples/xusb.c
@@ -515,7 +515,7 @@ int test_mass_storage(libusb_device_handle *handle, uint8_t endpoint_in, uint8_t
} else {
display_buffer_hex(data, size);
if ((binary_dump) && ((fd = fopen(binary_name, "w")) != NULL)) {
- if (fwrite(data, 1, (size_t)size, fd) != size) {
+ if (fwrite(data, 1, (size_t)size, fd) != (unsigned int)size) {
perr(" unable to write binary data\n");
}
fclose(fd);
@@ -555,8 +555,8 @@ void read_ms_winsub_feature_descriptors(libusb_device_handle *handle, uint8_t bR
printf("\nReading %s OS Feature Descriptor (wIndex = 0x%04d):\n", os_fd[i].desc, os_fd[i].index);
// Read the header part
- r = libusb_control_transfer(handle, LIBUSB_ENDPOINT_IN|LIBUSB_REQUEST_TYPE_VENDOR|os_fd[i].recipient,
- bRequest, ((iface_number)<< 8)|0x00, os_fd[i].index, os_desc, os_fd[i].header_size, 1000);
+ r = libusb_control_transfer(handle, (uint8_t)(LIBUSB_ENDPOINT_IN|LIBUSB_REQUEST_TYPE_VENDOR|os_fd[i].recipient),
+ bRequest, (uint16_t)(((iface_number)<< 8)|0x00), os_fd[i].index, os_desc, os_fd[i].header_size, 1000);
if (r < os_fd[i].header_size) {
perr(" Failed: %s", (r<0)?libusb_strerror((enum libusb_error)r):"header size is too small");
return;
@@ -568,8 +568,8 @@ void read_ms_winsub_feature_descriptors(libusb_device_handle *handle, uint8_t bR
}
// Read the full feature descriptor
- r = libusb_control_transfer(handle, LIBUSB_ENDPOINT_IN|LIBUSB_REQUEST_TYPE_VENDOR|os_fd[i].recipient,
- bRequest, ((iface_number)<< 8)|0x00, os_fd[i].index, os_desc, (uint16_t)length, 1000);
+ r = libusb_control_transfer(handle, (uint8_t)(LIBUSB_ENDPOINT_IN|LIBUSB_REQUEST_TYPE_VENDOR|os_fd[i].recipient),
+ bRequest, (uint16_t)(((iface_number)<< 8)|0x00), os_fd[i].index, os_desc, (uint16_t)length, 1000);
if (r < 0) {
perr(" Failed: %s", libusb_strerror((enum libusb_error)r));
return;