summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2019-03-19 17:38:36 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2019-09-19 19:22:18 +0300
commit070fb84ecf7e40fb3003a58471fac0934758d41e (patch)
tree00fe5a994c4b801cdac9bbb148bc2f69cc2601c0
parentbe30b162e451e91b6618bafb584288ce42f186f6 (diff)
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>
-rw-r--r--src/sna/fb/fbpict.c6
1 files changed, 5 insertions, 1 deletions
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)