sna: Assert expected return values
Keep the semantic analyser happy by consuming the expected return value with an assert. Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
2dc93b2a6c
commit
9f216e159b
|
|
@ -5200,15 +5200,15 @@ sna_fill_spans__gpu(DrawablePtr drawable, GCPtr gc, int n,
|
|||
}
|
||||
|
||||
if (gc->fillStyle == FillTiled) {
|
||||
sna_poly_fill_rect_tiled_blt(drawable,
|
||||
data->bo, NULL,
|
||||
gc, n, rect,
|
||||
&data->region.extents, 2);
|
||||
(void)sna_poly_fill_rect_tiled_blt(drawable,
|
||||
data->bo, NULL,
|
||||
gc, n, rect,
|
||||
&data->region.extents, 2);
|
||||
} else {
|
||||
sna_poly_fill_rect_stippled_blt(drawable,
|
||||
data->bo, NULL,
|
||||
gc, n, rect,
|
||||
&data->region.extents, 2);
|
||||
(void)sna_poly_fill_rect_stippled_blt(drawable,
|
||||
data->bo, NULL,
|
||||
gc, n, rect,
|
||||
&data->region.extents, 2);
|
||||
}
|
||||
free (rect);
|
||||
}
|
||||
|
|
@ -6212,8 +6212,12 @@ sna_poly_zero_line_blt(DrawablePtr drawable,
|
|||
}
|
||||
b->x2++;
|
||||
b->y2++;
|
||||
if (oc1 | oc2)
|
||||
box_intersect(b, extents);
|
||||
if (oc1 | oc2) {
|
||||
bool intersects;
|
||||
|
||||
intersects = box_intersect(b, extents);
|
||||
assert(intersects);
|
||||
}
|
||||
if (++b == last_box) {
|
||||
ret = &&rectangle_continue;
|
||||
goto *jump;
|
||||
|
|
|
|||
|
|
@ -1205,16 +1205,18 @@ blt_put_composite(struct sna *sna,
|
|||
data, pitch);
|
||||
} else {
|
||||
BoxRec box;
|
||||
bool ok;
|
||||
|
||||
box.x1 = dst_x;
|
||||
box.y1 = dst_y;
|
||||
box.x2 = dst_x + r->width;
|
||||
box.y2 = dst_y + r->height;
|
||||
|
||||
sna_write_boxes(sna, dst,
|
||||
dst_priv->gpu_bo, 0, 0,
|
||||
data, pitch, src_x, src_y,
|
||||
&box, 1);
|
||||
ok = sna_write_boxes(sna, dst,
|
||||
dst_priv->gpu_bo, 0, 0,
|
||||
data, pitch, src_x, src_y,
|
||||
&box, 1);
|
||||
assert(ok);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1242,12 +1244,15 @@ fastcall static void blt_put_composite_box(struct sna *sna,
|
|||
sna_replace(sna, op->dst.pixmap, &dst_priv->gpu_bo,
|
||||
data, pitch);
|
||||
} else {
|
||||
sna_write_boxes(sna, op->dst.pixmap,
|
||||
op->dst.bo, op->dst.x, op->dst.y,
|
||||
src->devPrivate.ptr,
|
||||
src->devKind,
|
||||
op->u.blt.sx, op->u.blt.sy,
|
||||
box, 1);
|
||||
bool ok;
|
||||
|
||||
ok = sna_write_boxes(sna, op->dst.pixmap,
|
||||
op->dst.bo, op->dst.x, op->dst.y,
|
||||
src->devPrivate.ptr,
|
||||
src->devKind,
|
||||
op->u.blt.sx, op->u.blt.sy,
|
||||
box, 1);
|
||||
assert(ok);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1276,12 +1281,15 @@ static void blt_put_composite_boxes(struct sna *sna,
|
|||
sna_replace(sna, op->dst.pixmap, &dst_priv->gpu_bo,
|
||||
data, pitch);
|
||||
} else {
|
||||
sna_write_boxes(sna, op->dst.pixmap,
|
||||
op->dst.bo, op->dst.x, op->dst.y,
|
||||
src->devPrivate.ptr,
|
||||
src->devKind,
|
||||
op->u.blt.sx, op->u.blt.sy,
|
||||
box, n);
|
||||
bool ok;
|
||||
|
||||
ok = sna_write_boxes(sna, op->dst.pixmap,
|
||||
op->dst.bo, op->dst.x, op->dst.y,
|
||||
src->devPrivate.ptr,
|
||||
src->devKind,
|
||||
op->u.blt.sx, op->u.blt.sy,
|
||||
box, n);
|
||||
assert(ok);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -845,17 +845,19 @@ sna_composite_rectangles(CARD8 op,
|
|||
pixmap->drawable.width, pixmap->drawable.height);
|
||||
priv->undamaged = false;
|
||||
if (op <= PictOpSrc) {
|
||||
priv->clear = true;
|
||||
bool ok = true;
|
||||
|
||||
priv->clear_color = 0;
|
||||
if (op == PictOpSrc)
|
||||
sna_get_pixel_from_rgba(&priv->clear_color,
|
||||
color->red,
|
||||
color->green,
|
||||
color->blue,
|
||||
color->alpha,
|
||||
dst->format);
|
||||
DBG(("%s: marking clear [%08x]\n",
|
||||
__FUNCTION__, priv->clear_color));
|
||||
ok = sna_get_pixel_from_rgba(&priv->clear_color,
|
||||
color->red,
|
||||
color->green,
|
||||
color->blue,
|
||||
color->alpha,
|
||||
dst->format);
|
||||
priv->clear = ok;
|
||||
DBG(("%s: marking clear [%08x]? %d\n",
|
||||
__FUNCTION__, priv->clear_color, ok));
|
||||
}
|
||||
}
|
||||
if (!DAMAGE_IS_ALL(priv->gpu_damage)) {
|
||||
|
|
|
|||
|
|
@ -1886,12 +1886,15 @@ sna_render_composite_redirect_done(struct sna *sna,
|
|||
assert(op->dst.bo != t->real_bo);
|
||||
|
||||
if (t->box.x2 > t->box.x1) {
|
||||
bool ok;
|
||||
|
||||
DBG(("%s: copying temporary to dst\n", __FUNCTION__));
|
||||
sna_blt_copy_boxes(sna, GXcopy,
|
||||
op->dst.bo, -t->box.x1, -t->box.y1,
|
||||
t->real_bo, 0, 0,
|
||||
op->dst.pixmap->drawable.bitsPerPixel,
|
||||
&t->box, 1);
|
||||
ok = sna_blt_copy_boxes(sna, GXcopy,
|
||||
op->dst.bo, -t->box.x1, -t->box.y1,
|
||||
t->real_bo, 0, 0,
|
||||
op->dst.pixmap->drawable.bitsPerPixel,
|
||||
&t->box, 1);
|
||||
assert(ok);
|
||||
}
|
||||
if (t->damage) {
|
||||
DBG(("%s: combining damage, offset=(%d, %d)\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue