[Spice-devel] [PATCH] remove two 'set but not used' warnings in src/qxl_surface.c
Yaniv Kaul
ykaul at redhat.com
Sat Jul 23 22:05:46 PDT 2011
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]
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);
More information about the Spice-devel
mailing list