summaryrefslogtreecommitdiff
path: root/examples/xusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/xusb.c')
-rw-r--r--examples/xusb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/xusb.c b/examples/xusb.c
index 69b3d55..34030a6 100644
--- a/examples/xusb.c
+++ b/examples/xusb.c
@@ -467,7 +467,7 @@ int test_device(uint16_t vid, uint16_t pid)
nb_strings = string[0];
printf("Retrieving string descriptors...\n");
for (i=1; i<nb_strings; i++) {
- if (libusb_get_string_descriptor_ascii(handle, i, string, 128) >= 0) {
+ if (libusb_get_string_descriptor_ascii(handle, (uint8_t)i, string, 128) >= 0) {
printf("string (%d/%d): \"%s\"\n", i, nb_strings-1, string);
}
}
@@ -505,7 +505,11 @@ int test_device(uint16_t vid, uint16_t pid)
return 0;
}
-int main(int argc, char** argv)
+int
+#ifdef _MSC_VER
+__cdecl
+#endif
+main(int argc, char** argv)
{
int r;