summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Hjelm <hjelmn@me.com>2014-03-21 13:23:39 -0600
committerNathan Hjelm <hjelmn@me.com>2014-03-21 13:23:39 -0600
commit19e88a6a588c51c0b3284e2b71385b12b0a37029 (patch)
treeda65d691005a78659f4d3317585ab8e05556caef
parent8eaf66c7af0809c3d651047066987a507f87f0f2 (diff)
downloadlibusb-19e88a6a588c51c0b3284e2b71385b12b0a37029.tar.gz
darwin: squash warning about returning size_t as int
I also updated the documentation on the backend get_config_descriptor function. The documentation incorrectly stated that this function returns 0 on success when it really returns the length of the descriptor. Signed-off-by: Nathan Hjelm <hjelmn@me.com>
-rw-r--r--libusb/libusbi.h2
-rw-r--r--libusb/os/darwin_usb.c2
-rw-r--r--libusb/version_nano.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index 7db9c59..3d21406 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -700,7 +700,7 @@ struct usbi_os_backend {
* (LE). If it returns the multi-byte values in host-endian format,
* set the host_endian output parameter to "1".
*
- * Return 0 on success or a LIBUSB_ERROR code on failure.
+ * Return the length read on success or a LIBUSB_ERROR code on failure.
*/
int (*get_config_descriptor)(struct libusb_device *device,
uint8_t config_index, unsigned char *buffer, size_t len,
diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
index beba158..5963965 100644
--- a/libusb/os/darwin_usb.c
+++ b/libusb/os/darwin_usb.c
@@ -523,7 +523,7 @@ static int darwin_get_config_descriptor(struct libusb_device *dev, uint8_t confi
if (ret != LIBUSB_SUCCESS)
return ret;
- return len;
+ return (int) len;
}
/* check whether the os has configured the device */
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 4e29faf..f11b477 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10871
+#define LIBUSB_NANO 10872