[Spice-devel,xf86-video-qxl,07/13] (questionable) qxl_surface: qxl_surface_prepare_access: handle unused but set warning with (void)

Submitted by Alon Levy on April 9, 2012, 5:33 p.m.

Details

Message ID 1333992799-14302-8-git-send-email-alevy@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Alon Levy April 9, 2012, 5:33 p.m.
---
 src/qxl_surface.c |    2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index 6761bf6..a283d5e 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -863,6 +863,8 @@  qxl_surface_prepare_access (qxl_surface_t  *surface,
 
     stride = pixman_image_get_stride (surface->dev_image);
     height = pixman_image_get_height (surface->dev_image);
+    (void)height; // XXX keep around for debug?
+    (void)stride;
 
     if (n_boxes < 25)
     {

Comments

On Mon, Apr 09, 2012 at 08:33:13PM +0300, Alon Levy wrote:
> ---
>  src/qxl_surface.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/qxl_surface.c b/src/qxl_surface.c
> index 6761bf6..a283d5e 100644
> --- a/src/qxl_surface.c
> +++ b/src/qxl_surface.c
> @@ -863,6 +863,8 @@ qxl_surface_prepare_access (qxl_surface_t  *surface,
>  
>      stride = pixman_image_get_stride (surface->dev_image);
>      height = pixman_image_get_height (surface->dev_image);
> +    (void)height; // XXX keep around for debug?
> +    (void)stride;

They used to be used in #if 0 blocks which were removed in 773fbda754de2dd,
these should be removed too in my opinion.

Christophe
On Tue, Apr 10, 2012 at 12:21:54PM +0200, Christophe Fergeau wrote:
> On Mon, Apr 09, 2012 at 08:33:13PM +0300, Alon Levy wrote:
> > ---
> >  src/qxl_surface.c |    2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/src/qxl_surface.c b/src/qxl_surface.c
> > index 6761bf6..a283d5e 100644
> > --- a/src/qxl_surface.c
> > +++ b/src/qxl_surface.c
> > @@ -863,6 +863,8 @@ qxl_surface_prepare_access (qxl_surface_t  *surface,
> >  
> >      stride = pixman_image_get_stride (surface->dev_image);
> >      height = pixman_image_get_height (surface->dev_image);
> > +    (void)height; // XXX keep around for debug?
> > +    (void)stride;
> 
> They used to be used in #if 0 blocks which were removed in 773fbda754de2dd,
> these should be removed too in my opinion.

OK.

> 
> Christophe