From 258f8983daa3a8fe315c440f5e298ae1b02fd678 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 25 Jun 2014 17:20:52 +0100 Subject: sna: Fix uninitialisable variable sna_render.c: In function 'sna_render_picture_downsample': sna_render.c:822: warning: 'priv' may be used uninitialized in this function introduced in commit ded05e8abb248664124d2b86f77c27497a252c4e Author: Chris Wilson Date: Mon Jun 23 22:15:56 2014 +0100 sna: Allow scratch pixmap to allocate linear GPU bo Signed-off-by: Chris Wilson --- src/sna/sna_render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sna/sna_render.c') diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index a2835c6a..3eb43553 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -771,7 +771,8 @@ static int sna_render_picture_downsample(struct sna *sna, if (tmp == NULL) goto fixup; - assert(__sna_pixmap_get_bo(tmp)); + priv = sna_pixmap(tmp); + assert(priv && priv->gpu_bo); if (!sna_pixmap_move_to_gpu(pixmap, MOVE_SOURCE_HINT | MOVE_READ)) { fixup: -- cgit v1.2.3