xlib/shm: Appease the compiler for a 'maybe used uninitialised' variable

Initialise shm during its declaration so that it is indeed initialised
for the cleanup after every path.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-01-29 03:52:02 +00:00
parent 9b92625151
commit 41ae904461

View file

@ -246,7 +246,7 @@ draw_image_boxes (void *_dst,
{
cairo_xlib_surface_t *dst = _dst;
struct _cairo_boxes_chunk *chunk;
cairo_image_surface_t *shm;
cairo_image_surface_t *shm = NULL;
cairo_int_status_t status;
int i;
@ -260,7 +260,6 @@ draw_image_boxes (void *_dst,
goto draw_image_boxes;
}
shm = NULL;
if (boxes_cover_surface (boxes, dst))
shm = (cairo_image_surface_t *) _cairo_xlib_surface_get_shm (dst, TRUE);
if (shm) {