Re: [Spice-devel] [PATCH spice-common] build: Remove unused git-version-gen file

2019-05-29 Thread Eduardo Lima (Etrunko)
On 5/17/19 7:43 AM, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio 
> ---
>  build-aux/git-version-gen | 158 --
>  1 file changed, 158 deletions(-)
>  delete mode 100755 build-aux/git-version-gen
> 
> diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
> deleted file mode 100755
> index 5617eb8..000
> --- a/build-aux/git-version-gen
> +++ /dev/null
> @@ -1,158 +0,0 @@
> -#!/bin/sh
> -# Print a version string.
> -scriptversion=2010-06-14.19; # UTC
> -
> -# Copyright (C) 2007-2010 Free Software Foundation, Inc.
> -#
> -# This program is free software: you can redistribute it and/or modify
> -# it under the terms of the GNU General Public License as published by
> -# the Free Software Foundation; either version 3 of the License, or
> -# (at your option) any later version.
> -#
> -# This program is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -# GNU General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with this program.  If not, see .
> -
> -# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
> -# It may be run two ways:
> -# - from a git repository in which the "git describe" command below
> -#   produces useful output (thus requiring at least one signed tag)
> -# - from a non-git-repo directory containing a .tarball-version file, which
> -#   presumes this script is invoked like "./git-version-gen 
> .tarball-version".
> -
> -# In order to use intra-version strings in your project, you will need two
> -# separate generated version string files:
> -#
> -# .tarball-version - present only in a distribution tarball, and not in
> -#   a checked-out repository.  Created with contents that were learned at
> -#   the last time autoconf was run, and used by git-version-gen.  Must not
> -#   be present in either $(srcdir) or $(builddir) for git-version-gen to
> -#   give accurate answers during normal development with a checked out tree,
> -#   but must be present in a tarball when there is no version control system.
> -#   Therefore, it cannot be used in any dependencies.  GNUmakefile has
> -#   hooks to force a reconfigure at distribution time to get the value
> -#   correct, without penalizing normal development with extra reconfigures.
> -#
> -# .version - present in a checked-out repository and in a distribution
> -#   tarball.  Usable in dependencies, particularly for files that don't
> -#   want to depend on config.h but do want to track version changes.
> -#   Delete this file prior to any autoconf run where you want to rebuild
> -#   files to pick up a version string change; and leave it stale to
> -#   minimize rebuild time after unrelated changes to configure sources.
> -#
> -# It is probably wise to add these two files to .gitignore, so that you
> -# don't accidentally commit either generated file.
> -#
> -# Use the following line in your configure.ac, so that $(VERSION) will
> -# automatically be up-to-date each time configure is run (and note that
> -# since configure.ac no longer includes a version string, Makefile rules
> -# should not depend on configure.ac for version updates).
> -#
> -# AC_INIT([GNU project],
> -# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
> -# [bug-project@example])
> -#
> -# Then use the following lines in your Makefile.am, so that .version
> -# will be present for dependencies, and so that .tarball-version will
> -# exist in distribution tarballs.
> -#
> -# BUILT_SOURCES = $(top_srcdir)/.version
> -# $(top_srcdir)/.version:
> -#echo $(VERSION) > $@-t && mv $@-t $@
> -# dist-hook:
> -#echo $(VERSION) > $(distdir)/.tarball-version
> -
> -case $# in
> -1|2) ;;
> -*) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version" \
> - '[TAG-NORMALIZATION-SED-SCRIPT]'
> -   exit 1;;
> -esac
> -
> -tarball_version_file=$1
> -tag_sed_script="${2:-s/x/x/}"
> -nl='
> -'
> -
> -# Avoid meddling by environment variable of the same name.
> -v=
> -
> -# First see if there is a tarball-only version file.
> -# then try "git describe", then default.
> -if test -f $tarball_version_file
> -then
> -v=`cat $tarball_version_file` || exit 1
> -case $v in
> - *$nl*) v= ;; # reject multi-line output
> - [0-9]*) ;;
> - *) v= ;;
> -esac
> -test -z "$v" \
> - && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
> -fi
> -
> -if test -n "$v"
> -then
> -: # use $v
> -elif test -d .git \
> -&& v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
> -   || git describe --abbrev=4 HEAD 2>/dev/null` \
> -&& v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
> -&& case $v in
> -  v[0-9]*) ;;
> -  *) (exit 1) ;;
> -   esac
> -then
> -# Is this a new git that l

Re: [Spice-devel] [PATCH spice-gtk] meson: Workaround gtk+ exposing Objective C in headers on macOS

2019-05-29 Thread Marc-André Lureau
On Wed, May 29, 2019 at 12:05 PM Frediano Ziglio  wrote:
>
> Apply the same workaround in 3c9b37bfc7c88969dfe16b8bfd874745e0fceb8a
> for Meson.
>
> Signed-off-by: Frediano Ziglio 

ack

> ---
>  meson.build | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/meson.build b/meson.build
> index 8c6288f3..4c065a43 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -341,6 +341,11 @@ if spice_gtk_has_gtk
>
> '-DGDK_VERSION_MAX_ALLOWED=@0@'.format(gtk_encoded_version)]
>  endif
>
> +# Workaround gtk+ exposing Objective C: 
> https://gitlab.gnome.org/GNOME/gtk/issues/1737
> +if host_machine.system() == 'darwin'
> +  spice_gtk_global_cflags += ['-ObjC']
> +endif
> +
>  
> add_project_arguments(compiler.get_supported_arguments(spice_gtk_global_cflags),
>language : 'c')
>
> --
> 2.20.1
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH spice-gtk] meson: Workaround gtk+ exposing Objective C in headers on macOS

2019-05-29 Thread Frediano Ziglio
Apply the same workaround in 3c9b37bfc7c88969dfe16b8bfd874745e0fceb8a
for Meson.

Signed-off-by: Frediano Ziglio 
---
 meson.build | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meson.build b/meson.build
index 8c6288f3..4c065a43 100644
--- a/meson.build
+++ b/meson.build
@@ -341,6 +341,11 @@ if spice_gtk_has_gtk
   
'-DGDK_VERSION_MAX_ALLOWED=@0@'.format(gtk_encoded_version)]
 endif
 
+# Workaround gtk+ exposing Objective C: 
https://gitlab.gnome.org/GNOME/gtk/issues/1737
+if host_machine.system() == 'darwin'
+  spice_gtk_global_cflags += ['-ObjC']
+endif
+
 
add_project_arguments(compiler.get_supported_arguments(spice_gtk_global_cflags),
   language : 'c')
 
-- 
2.20.1

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-protocol 2/3] qxl_dev: Fix alignment for QXLReleaseInfo

2019-05-29 Thread Frediano Ziglio
ping

> 
> ping
> 
> > 
> > Do not declare the structure as aligned.
> > The start/end-packed.h headers affects only MingW or Microsoft
> > compilers. To have unaligned structure with GCC compiler you have
> > to use SPICE_ATTR_PACKED. This way the definition are the same for
> > all compiler.
> > This structure is used in a lot of QXL structures which are not
> > aligned causing to have an aligned structure to be potentially
> > unaligned.
> > As this structure has no holes this change does not make any size
> > change using any compiler.
> > The change will only change the alignment from 4/8 to 1.
> > This could affect structures containing this union however beside
> > packed structure in qxl_dev.h (which are not affected) there are no
> > other usages as such by spice-gtk, Qemu or spice-server.
> > 
> > Signed-off-by: Frediano Ziglio 
> > ---
> >  spice/qxl_dev.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
> > index a9cc4f4..659f930 100644
> > --- a/spice/qxl_dev.h
> > +++ b/spice/qxl_dev.h
> > @@ -275,7 +275,7 @@ typedef struct SPICE_ATTR_ALIGNED(4) SPICE_ATTR_PACKED
> > QXLRam {
> >  
> >  } QXLRam;
> >  
> > -typedef union QXLReleaseInfo {
> > +typedef union SPICE_ATTR_PACKED QXLReleaseInfo {
> >  uint64_t id;  // in
> >  uint64_t next;// out
> >  } QXLReleaseInfo;
> 
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-protocol 3/3] qxl_dev: Move QXLReleaseInfoExt out of start/end-packed.h

2019-05-29 Thread Frediano Ziglio
ping

> 
> ping
> 
> > 
> > This structure is not declares as SPICE_ATTR_PACKED resulting it
> > as aligned and no packed using GCC (no MingW).
> > This structure is only packed under MingW or Microsoft compilers.
> > This structure is not technically a definition for QXL device but
> > is used only for spice-server QXL interface.
> > As said above this change could affect only MingW/Microsoft that is
> > only Windows ABI of spice-server (very recently added) so
> > following lines are really not much important.
> > Note that Windows does not support architectures with CPUs not
> > supporting unaligned access.
> > Under Win32 this change don't affect size so nothing much can change.
> > This structure is currently passed as value to release_resource
> > callback. Under Win64 this structure is passed like a
> > "const QXLReleaseInfoExt *" so even if the structure is 16 bytes instead
> > of 12 this is read the same way.
> > 
> > Signed-off-by: Frediano Ziglio 
> > ---
> >  spice/qxl_dev.h | 10 +-
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
> > index 659f930..c844d7b 100644
> > --- a/spice/qxl_dev.h
> > +++ b/spice/qxl_dev.h
> > @@ -280,11 +280,6 @@ typedef union SPICE_ATTR_PACKED QXLReleaseInfo {
> >  uint64_t next;// out
> >  } QXLReleaseInfo;
> >  
> > -typedef struct QXLReleaseInfoExt {
> > -QXLReleaseInfo *info;
> > -uint32_t group_id;
> > -} QXLReleaseInfoExt;
> > -
> >  typedef struct  SPICE_ATTR_PACKED QXLDataChunk {
> >  uint32_t data_size;
> >  QXLPHYSICAL prev_chunk;
> > @@ -779,4 +774,9 @@ typedef struct SPICE_ATTR_PACKED QXLMonitorsConfig {
> >  
> >  #include 
> >  
> > +typedef struct QXLReleaseInfoExt {
> > +QXLReleaseInfo *info;
> > +uint32_t group_id;
> > +} QXLReleaseInfoExt;
> > +
> >  #endif /* _H_QXL_DEV */
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 0/4] Check distribution with CI

2019-05-29 Thread Frediano Ziglio
ping the series

> 
> Make sure we can build distribution.
> Some small updates also to fix some minor issues.
> 
> CI results at
> https://gitlab.freedesktop.org/fziglio/spice-gtk/pipelines/37744
> 
> Frediano Ziglio (4):
>   ci: Test we can create a no dirty package
>   spice-client-gtk-module: Remove unused file
>   build: Do additional changes to Meson distribution
>   ci: Try Meson dist
> 
>  .gitlab-ci.yml| 20 
>  Makefile.am   |  1 +
>  build-aux/meson-dist  | 28 ++
>  meson.build   |  2 +-
>  src/spice-client-gtk-module.c | 45 ---
>  5 files changed, 50 insertions(+), 46 deletions(-)
>  create mode 100755 build-aux/meson-dist
>  delete mode 100644 src/spice-client-gtk-module.c
> 
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-common] build: Remove unused git-version-gen file

2019-05-29 Thread Frediano Ziglio
ping

> 
> Signed-off-by: Frediano Ziglio 
> ---
>  build-aux/git-version-gen | 158 --
>  1 file changed, 158 deletions(-)
>  delete mode 100755 build-aux/git-version-gen
> 
> diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
> deleted file mode 100755
> index 5617eb8..000
> --- a/build-aux/git-version-gen
> +++ /dev/null
> @@ -1,158 +0,0 @@
> -#!/bin/sh
> -# Print a version string.
> -scriptversion=2010-06-14.19; # UTC
> -
> -# Copyright (C) 2007-2010 Free Software Foundation, Inc.
> -#
> -# This program is free software: you can redistribute it and/or modify
> -# it under the terms of the GNU General Public License as published by
> -# the Free Software Foundation; either version 3 of the License, or
> -# (at your option) any later version.
> -#
> -# This program is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -# GNU General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with this program.  If not, see .
> -
> -# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
> -# It may be run two ways:
> -# - from a git repository in which the "git describe" command below
> -#   produces useful output (thus requiring at least one signed tag)
> -# - from a non-git-repo directory containing a .tarball-version file, which
> -#   presumes this script is invoked like "./git-version-gen
> .tarball-version".
> -
> -# In order to use intra-version strings in your project, you will need two
> -# separate generated version string files:
> -#
> -# .tarball-version - present only in a distribution tarball, and not in
> -#   a checked-out repository.  Created with contents that were learned at
> -#   the last time autoconf was run, and used by git-version-gen.  Must not
> -#   be present in either $(srcdir) or $(builddir) for git-version-gen to
> -#   give accurate answers during normal development with a checked out tree,
> -#   but must be present in a tarball when there is no version control
> system.
> -#   Therefore, it cannot be used in any dependencies.  GNUmakefile has
> -#   hooks to force a reconfigure at distribution time to get the value
> -#   correct, without penalizing normal development with extra reconfigures.
> -#
> -# .version - present in a checked-out repository and in a distribution
> -#   tarball.  Usable in dependencies, particularly for files that don't
> -#   want to depend on config.h but do want to track version changes.
> -#   Delete this file prior to any autoconf run where you want to rebuild
> -#   files to pick up a version string change; and leave it stale to
> -#   minimize rebuild time after unrelated changes to configure sources.
> -#
> -# It is probably wise to add these two files to .gitignore, so that you
> -# don't accidentally commit either generated file.
> -#
> -# Use the following line in your configure.ac, so that $(VERSION) will
> -# automatically be up-to-date each time configure is run (and note that
> -# since configure.ac no longer includes a version string, Makefile rules
> -# should not depend on configure.ac for version updates).
> -#
> -# AC_INIT([GNU project],
> -# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
> -# [bug-project@example])
> -#
> -# Then use the following lines in your Makefile.am, so that .version
> -# will be present for dependencies, and so that .tarball-version will
> -# exist in distribution tarballs.
> -#
> -# BUILT_SOURCES = $(top_srcdir)/.version
> -# $(top_srcdir)/.version:
> -#echo $(VERSION) > $@-t && mv $@-t $@
> -# dist-hook:
> -#echo $(VERSION) > $(distdir)/.tarball-version
> -
> -case $# in
> -1|2) ;;
> -*) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version" \
> - '[TAG-NORMALIZATION-SED-SCRIPT]'
> -   exit 1;;
> -esac
> -
> -tarball_version_file=$1
> -tag_sed_script="${2:-s/x/x/}"
> -nl='
> -'
> -
> -# Avoid meddling by environment variable of the same name.
> -v=
> -
> -# First see if there is a tarball-only version file.
> -# then try "git describe", then default.
> -if test -f $tarball_version_file
> -then
> -v=`cat $tarball_version_file` || exit 1
> -case $v in
> - *$nl*) v= ;; # reject multi-line output
> - [0-9]*) ;;
> - *) v= ;;
> -esac
> -test -z "$v" \
> - && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
> -fi
> -
> -if test -n "$v"
> -then
> -: # use $v
> -elif test -d .git \
> -&& v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
> -   || git describe --abbrev=4 HEAD 2>/dev/null` \
> -&& v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
> -&& case $v in
> -  v[0-9]*) ;;
> -  *) (exit 1) ;;
> -   esac
> -then
> -# Is this a new git that lists number of commits since the 

Re: [Spice-devel] [PATCH spice-gtk] usb-device-manager: Define _SpiceUsbDevice instead of SpiceUsbDeviceInfo

2019-05-29 Thread Frediano Ziglio
ping

> 
> SpiceUsbDevice* was converted to SpiceUsbDeviceInfo* as _SpiceUsbDevice
> was never defines. Define instead the structure to avoid useless
> casts.
> 
> Signed-off-by: Frediano Ziglio 
> ---
>  src/usb-device-manager.c | 59 ++--
>  1 file changed, 20 insertions(+), 39 deletions(-)
> 
> diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
> index bd421426..acb4659e 100644
> --- a/src/usb-device-manager.c
> +++ b/src/usb-device-manager.c
> @@ -130,7 +130,7 @@ enum {
>  
>  #ifdef USE_USBREDIR
>  
> -typedef struct _SpiceUsbDeviceInfo {
> +struct _SpiceUsbDevice {
>  guint8  busnum;
>  guint8  devaddr;
>  guint16 vid;
> @@ -138,7 +138,7 @@ typedef struct _SpiceUsbDeviceInfo {
>  gboolean isochronous;
>  libusb_device *libdev;
>  gintref;
> -} SpiceUsbDeviceInfo;
> +};
>  
>  
>  static void channel_new(SpiceSession *session, SpiceChannel *channel,
> @@ -161,7 +161,7 @@ static int
> spice_usb_device_manager_hotplug_cb(libusb_context   *ctx,
>  static void spice_usb_device_manager_check_redir_on_connect(
>  SpiceUsbDeviceManager *self, SpiceChannel *channel);
>  
> -static SpiceUsbDeviceInfo *spice_usb_device_new(libusb_device *libdev);
> +static SpiceUsbDevice *spice_usb_device_new(libusb_device *libdev);
>  static SpiceUsbDevice *spice_usb_device_ref(SpiceUsbDevice *device);
>  static void spice_usb_device_unref(SpiceUsbDevice *device);
>  
> @@ -751,11 +751,9 @@ static gboolean
> spice_usb_device_manager_get_device_descriptor(
>   * Since: 0.27
>   **/
>  gconstpointer
> -spice_usb_device_get_libusb_device(const SpiceUsbDevice *device
> G_GNUC_UNUSED)
> +spice_usb_device_get_libusb_device(const SpiceUsbDevice *info G_GNUC_UNUSED)
>  {
>  #ifdef USE_USBREDIR
> -const SpiceUsbDeviceInfo *info = (const SpiceUsbDeviceInfo *)device;
> -
>  g_return_val_if_fail(info != NULL, FALSE);
>  
>  return info->libdev;
> @@ -1724,11 +1722,11 @@ static gboolean
> probe_isochronous_endpoint(libusb_device *libdev)
>  }
>  
>  /*
> - * SpiceUsbDeviceInfo
> + * SpiceUsbDevice
>   */
> -static SpiceUsbDeviceInfo *spice_usb_device_new(libusb_device *libdev)
> +static SpiceUsbDevice *spice_usb_device_new(libusb_device *libdev)
>  {
> -SpiceUsbDeviceInfo *info;
> +SpiceUsbDevice *info;
>  int vid, pid;
>  guint8 bus, addr;
>  
> @@ -1741,7 +1739,7 @@ static SpiceUsbDeviceInfo
> *spice_usb_device_new(libusb_device *libdev)
>  return NULL;
>  }
>  
> -info = g_new0(SpiceUsbDeviceInfo, 1);
> +info = g_new0(SpiceUsbDevice, 1);
>  
>  info->busnum  = bus;
>  info->devaddr = addr;
> @@ -1754,46 +1752,36 @@ static SpiceUsbDeviceInfo
> *spice_usb_device_new(libusb_device *libdev)
>  return info;
>  }
>  
> -guint8 spice_usb_device_get_busnum(const SpiceUsbDevice *device)
> +guint8 spice_usb_device_get_busnum(const SpiceUsbDevice *info)
>  {
> -const SpiceUsbDeviceInfo *info = (const SpiceUsbDeviceInfo *)device;
> -
>  g_return_val_if_fail(info != NULL, 0);
>  
>  return info->busnum;
>  }
>  
> -guint8 spice_usb_device_get_devaddr(const SpiceUsbDevice *device)
> +guint8 spice_usb_device_get_devaddr(const SpiceUsbDevice *info)
>  {
> -const SpiceUsbDeviceInfo *info = (const SpiceUsbDeviceInfo *)device;
> -
>  g_return_val_if_fail(info != NULL, 0);
>  
>  return info->devaddr;
>  }
>  
> -guint16 spice_usb_device_get_vid(const SpiceUsbDevice *device)
> +guint16 spice_usb_device_get_vid(const SpiceUsbDevice *info)
>  {
> -const SpiceUsbDeviceInfo *info = (const SpiceUsbDeviceInfo *)device;
> -
>  g_return_val_if_fail(info != NULL, 0);
>  
>  return info->vid;
>  }
>  
> -guint16 spice_usb_device_get_pid(const SpiceUsbDevice *device)
> +guint16 spice_usb_device_get_pid(const SpiceUsbDevice *info)
>  {
> -const SpiceUsbDeviceInfo *info = (const SpiceUsbDeviceInfo *)device;
> -
>  g_return_val_if_fail(info != NULL, 0);
>  
>  return info->pid;
>  }
>  
> -gboolean spice_usb_device_is_isochronous(const SpiceUsbDevice *device)
> +gboolean spice_usb_device_is_isochronous(const SpiceUsbDevice *info)
>  {
> -const SpiceUsbDeviceInfo *info = (const SpiceUsbDeviceInfo *)device;
> -
>  g_return_val_if_fail(info != NULL, 0);
>  
>  return info->isochronous;
> @@ -1866,21 +1854,17 @@ void _usbdk_hider_update(SpiceUsbDeviceManager
> *manager)
>  
>  #endif
>  
> -static SpiceUsbDevice *spice_usb_device_ref(SpiceUsbDevice *device)
> +static SpiceUsbDevice *spice_usb_device_ref(SpiceUsbDevice *info)
>  {
> -SpiceUsbDeviceInfo *info = (SpiceUsbDeviceInfo *)device;
> -
>  g_return_val_if_fail(info != NULL, NULL);
>  g_atomic_int_inc(&info->ref);
> -return device;
> +return info;
>  }
>  
> -static void spice_usb_device_unref(SpiceUsbDevice *device)
> +static void spice_usb_device_unref(SpiceUsbDevice *info)
>  {
>  gboolean ref_count_is_0;
>  
> -SpiceUsbDeviceInfo *info = (SpiceUsbDeviceInfo *)device;
> -
>  g_return