summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@gmail.com>2014-01-24 21:39:13 +0800
committerZhigang Gong <zhigang.gong@gmail.com>2014-01-24 21:40:14 +0800
commitaff2f8d9533f565bf5924a673e0702d38b7effbd (patch)
tree0b4150465cbe61845a2349122096717c6eed5e6f
parent2b4a324b03c3ee34de1c122a6db4e6ce7146a3e0 (diff)
Silent some compilation warnings.
Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com>
-rw-r--r--src/glamor_getspans.c12
-rw-r--r--src/glamor_render.c5
2 files changed, 9 insertions, 8 deletions
diff --git a/src/glamor_getspans.c b/src/glamor_getspans.c
index 6d6c8e9..dfb8ef4 100644
--- a/src/glamor_getspans.c
+++ b/src/glamor_getspans.c
@@ -39,7 +39,6 @@ _glamor_get_spans(DrawablePtr drawable,
glamor_get_pixmap_private(pixmap);
int i;
uint8_t *readpixels_dst = (uint8_t *) dst;
- void *data;
int x_off, y_off;
Bool ret = FALSE;
@@ -48,10 +47,13 @@ _glamor_get_spans(DrawablePtr drawable,
glamor_get_drawable_deltas(drawable, pixmap, &x_off, &y_off);
for (i = 0; i < count; i++) {
- data = glamor_download_sub_pixmap_to_cpu(pixmap, points[i].x + x_off,
- points[i].y + y_off, widths[i], 1,
- PixmapBytePad(widths[i], drawable->depth),
- readpixels_dst, 0, GLAMOR_ACCESS_RO);
+#ifdef DEBUG
+ void *data =
+#endif
+ glamor_download_sub_pixmap_to_cpu(pixmap, points[i].x + x_off,
+ points[i].y + y_off, widths[i], 1,
+ PixmapBytePad(widths[i], drawable->depth),
+ readpixels_dst, 0, GLAMOR_ACCESS_RO);
assert(data == readpixels_dst);
readpixels_dst += PixmapBytePad(widths[i], drawable->depth);
}
diff --git a/src/glamor_render.c b/src/glamor_render.c
index 21b8085..492d94d 100644
--- a/src/glamor_render.c
+++ b/src/glamor_render.c
@@ -865,16 +865,15 @@ combine_pict_format(PictFormatShort * des, const PictFormatShort src,
const PictFormatShort mask, enum shader_in in_ca)
{
PictFormatShort new_vis;
- int src_type, mask_type, src_bpp, mask_bpp;
+ int src_type, mask_type, src_bpp;
int i;
if (src == mask) {
*des = src;
return TRUE;
}
src_bpp = PICT_FORMAT_BPP(src);
- mask_bpp = PICT_FORMAT_BPP(mask);
- assert(src_bpp == mask_bpp);
+ assert(src_bpp == PICT_FORMAT_BPP(mask));
new_vis = PICT_FORMAT_VIS(src) | PICT_FORMAT_VIS(mask);