From: Antonio Ospite Date: Mon, 26 Feb 2018 15:05:20 +0000 (+0100) Subject: am7xxx: specify LIBUSB_CALL for send_data_async_complete_cb() X-Git-Tag: v0.1.7~20 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/151dac365e5b086e4aae52585130fe26fc6b4cc5?ds=inline;hp=151dac365e5b086e4aae52585130fe26fc6b4cc5 am7xxx: specify LIBUSB_CALL for send_data_async_complete_cb() send_data_async_complete_cb() is used as a callback for libusb_fill_bulk_transfer() and it is expected to be of type 'libusb_transfer_cb_fn' which is defined using LIBUSB_CALL. LIBUSB_CALL is only used on Windows and not having it results in the following warning when compiling for Windows: .../libam7xxx/src/am7xxx.c: In function ‘send_data_async’: .../libam7xxx/src/am7xxx.c:508:7: warning: passing argument 6 of ‘libusb_fill_bulk_transfer’ from incompatible pointer type [-Wincompatible-pointer-types] send_data_async_complete_cb, dev, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/ao2/Proj/picoProjector/libam7xxx/src/am7xxx.c:24:0: .../libam7xxx/build/libusb-1.0.21/include/libusb-1.0/libusb.h:1553:20: note: expected ‘libusb_transfer_cb_fn’ but argument is of type ‘void (*)(struct libusb_transfer *)’ static inline void libusb_fill_bulk_transfer(struct libusb_transfer *transfer, ^~~~~~~~~~~~~~~~~~~~~~~~~ ---