sna: Silence compiler warning for a potential uninitialised return on error

sna_accel.c: In function 'sna_copy_plane':
sna_accel.c:5022:21: warning: 'ret' may be used uninitialized in this
function [-Wuninitialized]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-01-25 11:22:38 +00:00
parent 8d22a76506
commit a2e83c6dcb
1 changed files with 1 additions and 2 deletions

View File

@ -5019,7 +5019,7 @@ sna_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc,
{
PixmapPtr pixmap = get_drawable_pixmap(dst);
struct sna *sna = to_sna_from_pixmap(pixmap);
RegionRec region, *ret;
RegionRec region, *ret = NULL;
struct sna_damage **damage;
DBG(("%s: src=(%d, %d), dst=(%d, %d), size=%dx%d\n", __FUNCTION__,
@ -5105,7 +5105,6 @@ sna_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc,
fallback:
DBG(("%s: fallback\n", __FUNCTION__));
ret = NULL;
if (!sna_gc_move_to_cpu(gc, dst))
goto out;
if (!sna_drawable_move_region_to_cpu(dst, &region,