[Spice-devel] [PATCH v4 09/16] UsbDeviceManager: Move more redirection specific logic under corresponding ifdef

Christophe Fergeau cfergeau at redhat.com
Tue Sep 22 09:14:32 PDT 2015


What's happening if we don't do that ? warnings ? broken compilation ?

On Sun, Aug 16, 2015 at 03:35:46PM +0300, Dmitry Fleytman wrote:
> From: Kirill Moizik <kmoizik at redhat.com>
> 
> Signed-off-by: Kirill Moizik <kmoizik at redhat.com>
> Signed-off-by: Dmitry Fleytman <dfleytma at redhat.com>
> ---
>  src/usb-device-manager.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
> index f133907..71b2433 100644
> --- a/src/usb-device-manager.c
> +++ b/src/usb-device-manager.c
> @@ -1484,6 +1484,7 @@ gboolean spice_usb_device_manager_is_device_connected(SpiceUsbDeviceManager *sel
>      return !!spice_usb_device_manager_get_channel_for_dev(self, device);
>  }
>  
> +#ifdef USE_USBREDIR
>  /**
>   * spice_usb_device_manager_connect_device_async:
>   * @manager: the #SpiceUsbDeviceManager manager
> @@ -1509,7 +1510,6 @@ _spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,
>      result = g_simple_async_result_new(G_OBJECT(self), callback, user_data,
>                                 spice_usb_device_manager_connect_device_async);
>  
> -#ifdef USE_USBREDIR
>      SpiceUsbDeviceManagerPrivate *priv = self->priv;
>      libusb_device *libdev;
>      guint i;
> @@ -1555,18 +1555,16 @@ _spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,
>          libusb_unref_device(libdev);
>          return;
>      }
> -#endif
>  
>      g_simple_async_result_set_error(result,
>                              SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
>                              _("No free USB channel"));
> -#ifdef USE_USBREDIR
>  done:
> -#endif
>      g_simple_async_result_complete_in_idle(result);
>      g_object_unref(result);
>  }
>  
> +#endif
>  
>  void spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,
>                                               SpiceUsbDevice *device,
> -- 
> 2.4.3
> 
> _______________________________________________
> 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: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150922/590d72fd/attachment.sig>


More information about the Spice-devel mailing list