[Spice-devel] remove two 'set but not used' warnings in src/qxl_surface.c

Submitted by Yaniv Kaul on July 24, 2011, 12:05 p.m.

Details

Message ID 4E2BA82A.1020401@redhat.com
State New, archived
Headers show

Not browsing as part of any series.

Commit Message

Yaniv Kaul July 24, 2011, 12:05 p.m.
Fixes the compilation warnings:
...
qxl_surface.c: In function 'qxl_surface_prepare_access':
qxl_surface.c:943:17: warning: variable 'height' set but not used 
[-Wunused-but-set-variable]
qxl_surface.c:943:9: warning: variable 'stride' set but not used 
[-Wunused-but-set-variable]

Patch hide | download patch | download mbox

diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index 047b35a..dafda64 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -940,7 +940,9 @@  qxl_surface_prepare_access (qxl_surface_t  *surface,
      ScreenPtr pScreen = pixmap->drawable.pScreen;
      ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
      RegionRec new;
+#if 0
      int stride, height;
+#endif

      if (!pScrn->vtSema)
          return FALSE;
@@ -960,10 +962,10 @@  qxl_surface_prepare_access (qxl_surface_t  *surface,
      ErrorF ("Preparing access to %d boxes\n", n_boxes);
  #endif

-    stride = pixman_image_get_stride (surface->dev_image);
-    height = pixman_image_get_height (surface->dev_image);

  #if 0
+    stride = pixman_image_get_stride (surface->dev_image);
+    height = pixman_image_get_height (surface->dev_image);
      ErrorF ("Flattening %p -> %p  (allocated end %p)\n",
             surface->address,
             surface->address + stride * height, surface->end);