sna/fb: Initialize xoff/yoff

The compiler seems to think src/mask xoff/yoff can be used
uninitialized. Zero them to make sure.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This commit is contained in:
Ville Syrjälä 2019-03-19 17:38:36 +02:00
parent be30b162e4
commit 070fb84ecf
1 changed files with 5 additions and 1 deletions

View File

@ -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)