[virt-tools-list] [virt-viewer v1] Avoid harmless warnings due lack of oVirt on build

Pavel Grunt pgrunt at redhat.com
Mon Mar 6 08:43:39 UTC 2017


Ack

On Fri, 2017-03-03 at 16:01 +0100, Victor Toso wrote:
> From: Victor Toso <me at victortoso.com>
> 
> > remote-viewer.c: In function 'remote_viewer_get_property':
> > remote-viewer.c:227:26: warning: unused variable 'priv' [-Wunused-
> > variable]
> >      RemoteViewerPrivate *priv = self->priv;
> >                           ^~~~
> > remote-viewer.c:224:36: warning: unused parameter 'value' [-
> > Wunused-parameter]
> >      GValue *value, GParamSpec *pspec)
> >              ^~~~~
> > virt-viewer-window.c: In function
> > 'virt_viewer_window_menu_change_cd_activate':
> > virt-viewer-window.c:1077:62: warning: unused parameter 'self' [-
> > Wunused-parameter]
> >      VirtViewerWindow *self)
> >                        ^~~~
> 
> Signed-off-by: Victor Toso <victortoso at redhat.com>
> ---
>  src/remote-viewer.c      | 5 ++++-
>  src/virt-viewer-window.c | 2 +-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/remote-viewer.c b/src/remote-viewer.c
> index 8c31532..451fb1d 100644
> --- a/src/remote-viewer.c
> +++ b/src/remote-viewer.c
> @@ -221,10 +221,13 @@ end:
>  
>  static void
>  remote_viewer_get_property(GObject *object, guint property_id,
> -                           GValue *value, GParamSpec *pspec)
> +                           GValue *value G_GNUC_UNUSED,
> +                           GParamSpec *pspec)
>  {
> +#ifdef HAVE_OVIRT
>      RemoteViewer *self = REMOTE_VIEWER(object);
>      RemoteViewerPrivate *priv = self->priv;
> +#endif
>  
>      switch (property_id) {
>  #ifdef HAVE_OVIRT
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index 3f5a271..867a7b0 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -1074,7 +1074,7 @@ iso_dialog_response(GtkDialog *dialog,
>  
>  void
>  virt_viewer_window_menu_change_cd_activate(GtkWidget *menu
> G_GNUC_UNUSED,
> -                                           VirtViewerWindow *self)
> +                                           VirtViewerWindow *self
> G_GNUC_UNUSED)
>  {
>  #if HAVE_OVIRT
>      VirtViewerWindowPrivate *priv = self->priv;




More information about the virt-tools-list mailing list