[Spice-devel] [PATCH] remove two 'set but not used' warnings in src/qxl_surface.c
Christophe Fergeau
cfergeau at redhat.com
Mon Jul 25 01:17:35 PDT 2011
On Sun, Jul 24, 2011 at 08:05:46AM +0300, Yaniv Kaul wrote:
> Fixes the compilation warnings:
I'd even go with this patch to group all this debugging in the same spot:
diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index 047b35a..3292507 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -940,7 +940,6 @@ qxl_surface_prepare_access (qxl_surface_t *surface,
ScreenPtr pScreen = pixmap->drawable.pScreen;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RegionRec new;
- int stride, height;
if (!pScrn->vtSema)
return FALSE;
@@ -957,16 +956,17 @@ qxl_surface_prepare_access (qxl_surface_t *surface,
boxes = REGION_RECTS (region);
#if 0
- ErrorF ("Preparing access to %d boxes\n", n_boxes);
-#endif
+ {
+ int stride, height;
+ ErrorF ("Preparing access to %d boxes\n", n_boxes);
- stride = pixman_image_get_stride (surface->dev_image);
- height = pixman_image_get_height (surface->dev_image);
+ stride = pixman_image_get_stride (surface->dev_image);
+ height = pixman_image_get_height (surface->dev_image);
-#if 0
- ErrorF ("Flattening %p -> %p (allocated end %p)\n",
- surface->address,
- surface->address + stride * height, surface->end);
+ ErrorF ("Flattening %p -> %p (allocated end %p)\n",
+ surface->address,
+ surface->address + stride * height, surface->end);
+ }
#endif
if (n_boxes < 25)
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110725/a87e2523/attachment.pgp>
More information about the Spice-devel
mailing list