These fields are not used if USE_USBREDIR is not set. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- src/usb-device-manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c index 4b126896..dbb78390 100644 --- a/src/usb-device-manager.c +++ b/src/usb-device-manager.c @@ -107,10 +107,10 @@ struct _SpiceUsbDeviceManagerPrivate { HANDLE usbdk_hider_handle; #else gboolean redirecting; /* Handled by GUdevClient in the gudev case */ -#endif #endif GPtrArray *devices; GPtrArray *channels; +#endif }; enum { @@ -246,8 +246,8 @@ static void spice_usb_device_manager_init(SpiceUsbDeviceManager *self) spice_debug("UsbDk driver is not installed"); } #endif - priv->channels = g_ptr_array_new(); #ifdef USE_USBREDIR + priv->channels = g_ptr_array_new(); priv->devices = g_ptr_array_new_with_free_func((GDestroyNotify) spice_usb_device_unref); #endif @@ -343,11 +343,11 @@ static void spice_usb_device_manager_finalize(GObject *gobject) SpiceUsbDeviceManager *self = SPICE_USB_DEVICE_MANAGER(gobject); SpiceUsbDeviceManagerPrivate *priv = self->priv; +#ifdef USE_USBREDIR g_ptr_array_unref(priv->channels); - if (priv->devices) + if (priv->devices) { g_ptr_array_unref(priv->devices); - -#ifdef USE_USBREDIR + } #ifdef G_OS_WIN32 g_clear_object(&priv->udev); #endif -- 2.20.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel