[Spice-devel] [usbredir PATCH 4/6] usbredirhost: add LIBUSB_CALL to libusb complete-callback-functions

Christophe Fergeau cfergeau at redhat.com
Thu May 3 08:57:50 PDT 2012


ACK

Christophe

On Thu, May 03, 2012 at 06:04:37PM +0300, Uri Lublin wrote:
> In libusb.h the following definition appears:
> typedef void (LIBUSB_CALL *libusb_transfer_cb_fn)(struct libusb_transfer *transfer);
> 
> Added LIBUSB_CALL to the following functions:
> 	usbredirhost_iso_packet_complete
> 	usbredirhost_interrupt_packet_complete
> 	usbredirhost_control_packet_complete
> 	usbredirhost_bulk_packet_complete
> 
> This fixes the following compiler warning for Windows (mingw):
> ./usbredirhost/usbredirhost.c: In function 'usbredirhost_alloc_iso_stream':
> ./usbredir/usbredirhost/usbredirhost.c:1206:13: warning: passing argument 7 of 'libusb_fill_iso_transfer' from incompatible pointer type [enabled by default]
> ---
>  usbredirhost/usbredirhost.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/usbredirhost/usbredirhost.c b/usbredirhost/usbredirhost.c
> index 068ea1d..305dd35 100644
> --- a/usbredirhost/usbredirhost.c
> +++ b/usbredirhost/usbredirhost.c
> @@ -1032,7 +1032,7 @@ static int usbredirhost_handle_iso_status(struct usbredirhost *host,
>      }
>  }
> 
> -static void usbredirhost_iso_packet_complete(
> +static void LIBUSB_CALL usbredirhost_iso_packet_complete(
>      struct libusb_transfer *libusb_transfer)
>  {
>      struct usbredirtransfer *transfer = libusb_transfer->user_data;
> @@ -1271,7 +1271,7 @@ static int usbredirhost_submit_interrupt_in_transfer(struct usbredirhost *host,
>      return usb_redir_success;
>  }
> 
> -static void usbredirhost_interrupt_packet_complete(
> +static void LIBUSB_CALL usbredirhost_interrupt_packet_complete(
>      struct libusb_transfer *libusb_transfer)
>  {
>      struct usbredirtransfer *transfer = libusb_transfer->user_data;
> @@ -1794,7 +1794,7 @@ static void usbredirhost_cancel_data_packet(void *priv, uint32_t id)
>      UNLOCK(host);
>  }
> 
> -static void usbredirhost_control_packet_complete(
> +static void LIBUSB_CALL usbredirhost_control_packet_complete(
>      struct libusb_transfer *libusb_transfer)
>  {
>      struct usb_redir_control_packet_header control_packet;
> @@ -1925,7 +1925,7 @@ static void usbredirhost_control_packet(void *priv, uint32_t id,
>      }
>  }
> 
> -static void usbredirhost_bulk_packet_complete(
> +static void LIBUSB_CALL usbredirhost_bulk_packet_complete(
>      struct libusb_transfer *libusb_transfer)
>  {
>      struct usb_redir_bulk_packet_header bulk_packet;
> -- 
> 1.7.7.6
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120503/7e71dba6/attachment.pgp>


More information about the Spice-devel mailing list