From dcfbdfd1956632885fbec1076408ccca18481fcf Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Sat, 27 Jul 2013 21:33:28 +0200 Subject: [PATCH 1/1] am7xxx: fix a clang warning ../src/am7xxx.c:685:16: error: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32] num_devices = libusb_get_device_list(ctx->usb_context, &list); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libusb_get_device_list() returns ssize_t, just use it for the num_devices variable. --- src/am7xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/am7xxx.c b/src/am7xxx.c index 3e6b461..56f5bdc 100644 --- a/src/am7xxx.c +++ b/src/am7xxx.c @@ -667,7 +667,7 @@ typedef enum { static int scan_devices(am7xxx_context *ctx, scan_op op, unsigned int open_device_index, am7xxx_device **dev) { - int num_devices; + ssize_t num_devices; libusb_device** list; unsigned int current_index; int i; -- 2.1.4