windows: Fix various compiler warnings.
Add LIBUSB_CALL where needed to avoid warnings such as the following: In file included from src/hardware/hantek-dso/api.c:34:0: src/hardware/hantek-dso/dso.h:212:13: note: expected 'libusb_transfer_cb_fn' but argument is of type 'void (*)(struct libusb_transfer *)' SR_PRIV int dso_get_channeldata(const struct sr_dev_inst *sdi, ^
This commit is contained in:
parent
76598cda54
commit
55462b8ba9
|
@ -677,7 +677,7 @@ static int start_transfers(const struct sr_dev_inst *sdi)
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
static void dslogic_trigger_receive(struct libusb_transfer *transfer)
|
||||
static void LIBUSB_CALL dslogic_trigger_receive(struct libusb_transfer *transfer)
|
||||
{
|
||||
const struct sr_dev_inst *sdi;
|
||||
struct dslogic_trigger_pos *tpos;
|
||||
|
|
|
@ -375,7 +375,7 @@ static void resubmit_transfer(struct libusb_transfer *transfer)
|
|||
|
||||
}
|
||||
|
||||
SR_PRIV void fx2lafw_receive_transfer(struct libusb_transfer *transfer)
|
||||
SR_PRIV void LIBUSB_CALL fx2lafw_receive_transfer(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct dev_context *devc;
|
||||
|
|
|
@ -129,7 +129,7 @@ SR_PRIV gboolean match_manuf_prod(libusb_device *dev, const char *manufacturer,
|
|||
SR_PRIV int fx2lafw_dev_open(struct sr_dev_inst *sdi, struct sr_dev_driver *di);
|
||||
SR_PRIV struct dev_context *fx2lafw_dev_new(void);
|
||||
SR_PRIV void fx2lafw_abort_acquisition(struct dev_context *devc);
|
||||
SR_PRIV void fx2lafw_receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV void LIBUSB_CALL fx2lafw_receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV size_t fx2lafw_get_buffer_size(struct dev_context *devc);
|
||||
SR_PRIV unsigned int fx2lafw_get_number_of_transfers(struct dev_context *devc);
|
||||
SR_PRIV unsigned int fx2lafw_get_timeout(struct dev_context *devc);
|
||||
|
|
|
@ -769,7 +769,7 @@ static void send_chunk(struct sr_dev_inst *sdi, unsigned char *buf,
|
|||
* queued up beforehand, so this just needs to chuck the incoming data onto
|
||||
* the libsigrok session bus.
|
||||
*/
|
||||
static void receive_transfer(struct libusb_transfer *transfer)
|
||||
static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct sr_datafeed_packet packet;
|
||||
struct sr_dev_inst *sdi;
|
||||
|
|
|
@ -258,7 +258,7 @@ SR_PRIV int ikalogic_scanalogic2_receive_data(int fd, int revents, void *cb_data
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
SR_PRIV void sl2_receive_transfer_in( struct libusb_transfer *transfer)
|
||||
SR_PRIV void LIBUSB_CALL sl2_receive_transfer_in( struct libusb_transfer *transfer)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct dev_context *devc;
|
||||
|
@ -389,7 +389,7 @@ SR_PRIV void sl2_receive_transfer_in( struct libusb_transfer *transfer)
|
|||
}
|
||||
}
|
||||
|
||||
SR_PRIV void sl2_receive_transfer_out( struct libusb_transfer *transfer)
|
||||
SR_PRIV void LIBUSB_CALL sl2_receive_transfer_out( struct libusb_transfer *transfer)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct dev_context *devc;
|
||||
|
|
|
@ -217,8 +217,8 @@ struct dev_context {
|
|||
};
|
||||
|
||||
SR_PRIV int ikalogic_scanalogic2_receive_data(int fd, int revents, void *cb_data);
|
||||
SR_PRIV void sl2_receive_transfer_in(struct libusb_transfer *transfer);
|
||||
SR_PRIV void sl2_receive_transfer_out(struct libusb_transfer *transfer);
|
||||
SR_PRIV void LIBUSB_CALL sl2_receive_transfer_in(struct libusb_transfer *transfer);
|
||||
SR_PRIV void LIBUSB_CALL sl2_receive_transfer_out(struct libusb_transfer *transfer);
|
||||
SR_PRIV int sl2_set_samplerate(const struct sr_dev_inst *sdi,
|
||||
uint64_t samplerate);
|
||||
SR_PRIV int sl2_set_limit_samples(const struct sr_dev_inst *sdi,
|
||||
|
|
|
@ -124,7 +124,7 @@ static void send_data(const struct sr_dev_inst *sdi, void *buf, unsigned int buf
|
|||
|
||||
}
|
||||
|
||||
SR_PRIV void kecheng_kc_330b_receive_transfer(struct libusb_transfer *transfer)
|
||||
SR_PRIV void LIBUSB_CALL kecheng_kc_330b_receive_transfer(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct dev_context *devc;
|
||||
struct sr_dev_inst *sdi;
|
||||
|
|
|
@ -91,7 +91,7 @@ struct dev_context {
|
|||
};
|
||||
|
||||
SR_PRIV int kecheng_kc_330b_handle_events(int fd, int revents, void *cb_data);
|
||||
SR_PRIV void kecheng_kc_330b_receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV void LIBUSB_CALL kecheng_kc_330b_receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV int kecheng_kc_330b_configure(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV int kecheng_kc_330b_set_date_time(struct sr_dev_inst *sdi);
|
||||
SR_PRIV int kecheng_kc_330b_recording_get(const struct sr_dev_inst *sdi,
|
||||
|
|
|
@ -252,7 +252,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
static void mark_xfer(struct libusb_transfer *xfer)
|
||||
static void LIBUSB_CALL mark_xfer(struct libusb_transfer *xfer)
|
||||
{
|
||||
|
||||
if (xfer->status == LIBUSB_TRANSFER_COMPLETED)
|
||||
|
|
|
@ -77,7 +77,7 @@ static libusb_device_handle *lascar_open(struct libusb_device *dev)
|
|||
return dev_hdl;
|
||||
}
|
||||
|
||||
static void mark_xfer(struct libusb_transfer *xfer)
|
||||
static void LIBUSB_CALL mark_xfer(struct libusb_transfer *xfer)
|
||||
{
|
||||
|
||||
xfer->user_data = GINT_TO_POINTER(1);
|
||||
|
@ -503,7 +503,7 @@ SR_PRIV int lascar_el_usb_handle_events(int fd, int revents, void *cb_data)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
SR_PRIV void lascar_el_usb_receive_transfer(struct libusb_transfer *transfer)
|
||||
SR_PRIV void LIBUSB_CALL lascar_el_usb_receive_transfer(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct dev_context *devc;
|
||||
struct sr_dev_inst *sdi;
|
||||
|
|
|
@ -76,7 +76,7 @@ SR_PRIV int lascar_get_config(libusb_device_handle *dev_hdl,
|
|||
unsigned char *configblock, int *configlen);
|
||||
SR_PRIV struct sr_dev_inst *lascar_scan(int bus, int address);
|
||||
SR_PRIV int lascar_el_usb_handle_events(int fd, int revents, void *cb_data);
|
||||
SR_PRIV void lascar_el_usb_receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV void LIBUSB_CALL lascar_el_usb_receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV int lascar_start_logging(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV int lascar_stop_logging(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV int lascar_is_logging(const struct sr_dev_inst *sdi);
|
||||
|
|
|
@ -702,7 +702,7 @@ static size_t convert_sample_data(struct dev_context *devc,
|
|||
return ret;
|
||||
}
|
||||
|
||||
SR_PRIV void logic16_receive_transfer(struct libusb_transfer *transfer)
|
||||
SR_PRIV void LIBUSB_CALL logic16_receive_transfer(struct libusb_transfer *transfer)
|
||||
{
|
||||
gboolean packet_has_error = FALSE;
|
||||
struct sr_datafeed_packet packet;
|
||||
|
|
|
@ -97,6 +97,6 @@ SR_PRIV int logic16_setup_acquisition(const struct sr_dev_inst *sdi,
|
|||
SR_PRIV int logic16_start_acquisition(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV int logic16_abort_acquisition(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV int logic16_init_device(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV void logic16_receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV void LIBUSB_CALL logic16_receive_transfer(struct libusb_transfer *transfer);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -604,7 +604,7 @@ static void end_acquisition(struct sr_dev_inst *sdi)
|
|||
|
||||
/* USB output transfer completion callback.
|
||||
*/
|
||||
static void receive_transfer_out(struct libusb_transfer *transfer)
|
||||
static void LIBUSB_CALL receive_transfer_out(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct dev_context *devc;
|
||||
|
@ -658,7 +658,7 @@ static void receive_transfer_out(struct libusb_transfer *transfer)
|
|||
|
||||
/* USB input transfer completion callback.
|
||||
*/
|
||||
static void receive_transfer_in(struct libusb_transfer *transfer)
|
||||
static void LIBUSB_CALL receive_transfer_in(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct dev_context *devc;
|
||||
|
|
|
@ -372,7 +372,7 @@ static void receive_data(struct sr_dev_inst *sdi, unsigned char *data, int len)
|
|||
|
||||
}
|
||||
|
||||
SR_PRIV void receive_transfer(struct libusb_transfer *transfer)
|
||||
SR_PRIV void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct dev_context *devc;
|
||||
struct sr_dev_inst *sdi;
|
||||
|
|
|
@ -75,7 +75,7 @@ struct dev_context {
|
|||
|
||||
SR_PRIV int testo_set_serial_params(struct sr_usb_dev_inst *usb);
|
||||
SR_PRIV int testo_probe_channels(struct sr_dev_inst *sdi);
|
||||
SR_PRIV void receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV int testo_request_packet(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV gboolean testo_check_packet_prefix(uint8_t *buf, int len);
|
||||
SR_PRIV uint16_t crc16_mcrf4xx(uint16_t crc, uint8_t *data, size_t len);
|
||||
|
|
|
@ -145,7 +145,7 @@ static void process_packet(struct sr_dev_inst *sdi)
|
|||
|
||||
}
|
||||
|
||||
SR_PRIV void uni_t_ut32x_receive_transfer(struct libusb_transfer *transfer)
|
||||
SR_PRIV void LIBUSB_CALL uni_t_ut32x_receive_transfer(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct dev_context *devc;
|
||||
struct sr_dev_inst *sdi;
|
||||
|
|
|
@ -66,6 +66,6 @@ struct dev_context {
|
|||
};
|
||||
|
||||
SR_PRIV int uni_t_ut32x_handle_events(int fd, int revents, void *cb_data);
|
||||
SR_PRIV void uni_t_ut32x_receive_transfer(struct libusb_transfer *transfer);
|
||||
SR_PRIV void LIBUSB_CALL uni_t_ut32x_receive_transfer(struct libusb_transfer *transfer);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -286,7 +286,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
static void receive_transfer(struct libusb_transfer *transfer)
|
||||
static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer)
|
||||
{
|
||||
struct dev_context *devc;
|
||||
struct sr_dev_inst *sdi;
|
||||
|
|
Loading…
Reference in New Issue