aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/libusb1_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport/libusb1_base.cpp')
-rw-r--r--host/lib/transport/libusb1_base.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp
index c0c1d6a86..7b9e11da9 100644
--- a/host/lib/transport/libusb1_base.cpp
+++ b/host/lib/transport/libusb1_base.cpp
@@ -219,12 +219,12 @@ public:
);
unsigned char buff[512];
- ssize_t ret = libusb_get_string_descriptor_ascii(
- handle->get(), off, buff, sizeof(buff)
+ int ret = libusb_get_string_descriptor_ascii(
+ handle->get(), off, buff, int(sizeof(buff))
);
if (ret < 0) return ""; //on error, just return empty string
- std::string string_descriptor((char *)buff, ret);
+ std::string string_descriptor((char *)buff, size_t(ret));
byte_vector_t string_vec(string_descriptor.begin(), string_descriptor.end());
std::string out;
BOOST_FOREACH(boost::uint8_t byte, string_vec){