From 070fb84ecf7e40fb3003a58471fac0934758d41e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Tue, 19 Mar 2019 17:38:36 +0200 Subject: sna/fb: Initialize xoff/yoff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The compiler seems to think src/mask xoff/yoff can be used uninitialized. Zero them to make sure. Signed-off-by: Ville Syrjälä --- src/sna/fb/fbpict.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sna/fb/fbpict.c b/src/sna/fb/fbpict.c index abe223f3..8e65deb2 100644 --- a/src/sna/fb/fbpict.c +++ b/src/sna/fb/fbpict.c @@ -313,8 +313,10 @@ image_from_pict_internal(PicturePtr pict, Bool has_clip, int *xoff, int *yoff, { pixman_image_t *image = NULL; - if (!pict) + if (!pict) { + *xoff = *yoff = 0; return NULL; + } if (pict->pDrawable) { image = create_bits_picture(pict, has_clip, xoff, yoff); @@ -336,6 +338,8 @@ image_from_pict_internal(PicturePtr pict, Bool has_clip, int *xoff, int *yoff, image = create_conical_gradient_image(gradient); } *xoff = *yoff = 0; + } else { + *xoff = *yoff = 0; } if (image) -- cgit v1.2.1