From e707e448d30590c3b1e262d1b4ba3a7851932daa Mon Sep 17 00:00:00 2001 From: hayati ayguen Date: Sun, 18 Jun 2017 23:52:23 +0200 Subject: [PATCH] fix/add missing 'LIBUSB_CALL' at libusb callback 'hackrf_libusb_transfer_callback' this allows to remove function cast at prepare_transfers() missing 'LIBUSB_CALL' produced problems in debugger with Visual Studio 2017 Signed-off-by: hayati ayguen --- host/libhackrf/src/hackrf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/libhackrf/src/hackrf.c b/host/libhackrf/src/hackrf.c index 6117f2b9..4fb28406 100644 --- a/host/libhackrf/src/hackrf.c +++ b/host/libhackrf/src/hackrf.c @@ -1429,7 +1429,7 @@ static void* transfer_threadproc(void* arg) return NULL; } -static void hackrf_libusb_transfer_callback(struct libusb_transfer* usb_transfer) +static void LIBUSB_CALL hackrf_libusb_transfer_callback(struct libusb_transfer* usb_transfer) { hackrf_device* device = (hackrf_device*)usb_transfer->user_data; @@ -1502,7 +1502,7 @@ static int create_transfer_thread(hackrf_device* device, result = prepare_transfers( device, endpoint_address, - (libusb_transfer_cb_fn)hackrf_libusb_transfer_callback + hackrf_libusb_transfer_callback ); if( result != HACKRF_SUCCESS )