lecroy-logicstudio: Fix some compiler warnings on MinGW.

src/hardware/lecroy-logicstudio/protocol.c: In function 'handle_fetch_samples_done':
src/hardware/lecroy-logicstudio/protocol.c:261:3: warning: passing argument 6 of 'libusb_fill_bulk_transfer' from incompatible pointer type
   recv_bulk_transfer, (void *)sdi, USB_TIMEOUT_MS);
   ^
In file included from ./src/libsigrok-internal.h:31:0,
                 from src/hardware/lecroy-logicstudio/protocol.h:26,
                 from src/hardware/lecroy-logicstudio/protocol.c:23:
/home/uwe/sr_mingw/include/libusb-1.0/libusb.h:1546: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,
                    ^
src/hardware/lecroy-logicstudio/protocol.c: In function 'fetch_samples_async':
src/hardware/lecroy-logicstudio/protocol.c:314:4: warning: passing argument 6 of 'write_registers_async' from incompatible pointer type
    handle_fetch_samples_done);
    ^
src/hardware/lecroy-logicstudio/protocol.c:200:12: note: expected 'libusb_transfer_cb_fn' but argument is of type 'void (*)(struct libusb_transfer *)'
 static int write_registers_async(const struct sr_dev_inst *sdi,
            ^
src/hardware/lecroy-logicstudio/protocol.c: In function 'lls_start_acquisition':
src/hardware/lecroy-logicstudio/protocol.c:1122:3: warning: passing argument 6 of 'libusb_fill_interrupt_transfer' from incompatible pointer type
   recv_intr_transfer, (void *) sdi, USB_TIMEOUT_MS);
   ^
In file included from ./src/libsigrok-internal.h:31:0,
                 from src/hardware/lecroy-logicstudio/protocol.h:26,
                 from src/hardware/lecroy-logicstudio/protocol.c:23:
/home/uwe/sr_mingw/include/libusb-1.0/libusb.h:1602:20: note: expected 'libusb_transfer_cb_fn' but argument is of type 'void (*)(struct libusb_transfer *)'
 static inline void libusb_fill_interrupt_transfer(
                    ^
This commit is contained in:
Uwe Hermann 2016-01-07 23:22:42 +01:00
parent d64b5f43cc
commit ff7c7cda93
1 changed files with 5 additions and 5 deletions

View File

@ -114,8 +114,8 @@ struct regval {
uint16_t val; uint16_t val;
}; };
static void handle_fetch_samples_done(struct libusb_transfer *xfer); static void LIBUSB_CALL handle_fetch_samples_done(struct libusb_transfer *xfer);
static void recv_bulk_transfer(struct libusb_transfer *xfer); static void LIBUSB_CALL recv_bulk_transfer(struct libusb_transfer *xfer);
static const struct samplerate_info samplerates[] = { static const struct samplerate_info samplerates[] = {
{ SR_GHZ(1), -24, 0x1f }, { SR_GHZ(1), -24, 0x1f },
@ -241,7 +241,7 @@ static void prep_regw(struct regval *regval, uint8_t reg, uint16_t val)
regval->val = val; regval->val = val;
} }
static void handle_fetch_samples_done(struct libusb_transfer *xfer) static void LIBUSB_CALL handle_fetch_samples_done(struct libusb_transfer *xfer)
{ {
const struct sr_dev_inst *sdi; const struct sr_dev_inst *sdi;
struct sr_usb_dev_inst *usb; struct sr_usb_dev_inst *usb;
@ -907,7 +907,7 @@ SR_PRIV int lls_setup_acquisition(const struct sr_dev_inst *sdi)
return SR_OK; return SR_OK;
} }
static void recv_intr_transfer(struct libusb_transfer *xfer) static void LIBUSB_CALL recv_intr_transfer(struct libusb_transfer *xfer)
{ {
const struct sr_dev_inst *sdi; const struct sr_dev_inst *sdi;
struct drv_context *drvc; struct drv_context *drvc;
@ -1000,7 +1000,7 @@ static uint16_t sample_to_byte_offset(struct dev_context *devc, uint64_t o)
return o * devc->num_enabled_channel_groups; return o * devc->num_enabled_channel_groups;
} }
static void recv_bulk_transfer(struct libusb_transfer *xfer) static void LIBUSB_CALL recv_bulk_transfer(struct libusb_transfer *xfer)
{ {
const struct sr_dev_inst *sdi; const struct sr_dev_inst *sdi;
struct dev_context *devc; struct dev_context *devc;