Commit 2f4a2fe2 authored by Uri Lublin's avatar Uri Lublin

uxa: fix compiler warnings (initialize width, height, [xy]Dst_copy)

Some compiler warnings for example:
uxa-glyphs.c:1045: warning: ‘width’ may be used uninitialized in this function
uxa-glyphs.c:1045: warning: ‘height’ may be used uninitialized in this function
uxa-render.c:1090: warning: ‘xDst_copy’ may be used uninitialized in this function
uxa-render.c:1090: warning: ‘yDst_copy’ may be used uninitialized in this function

I think these can never actually happen as the code protects use of
those uninitialized variables, but I'd not "argue" with the compiler.
parent e8afc2cd
......@@ -1042,7 +1042,7 @@ uxa_glyphs(CARD8 op,
int xDst = list->xOff, yDst = list->yOff;
BoxRec extents = { 0, 0, 0, 0 };
Bool have_extents = FALSE;
int width, height, ret;
int width = 0, height = 0, ret;
PicturePtr localDst = pDst;
if (!uxa_screen->info->prepare_composite ||
......
......@@ -1087,7 +1087,7 @@ uxa_try_driver_composite(CARD8 op,
RegionRec region;
BoxPtr pbox;
int nbox;
int xDst_copy, yDst_copy;
int xDst_copy = 0, yDst_copy = 0;
int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix;
PicturePtr localSrc, localMask = NULL;
......@@ -1353,7 +1353,7 @@ uxa_try_magic_two_pass_composite_helper(CARD8 op,
ScreenPtr screen = pDst->pDrawable->pScreen;
uxa_screen_t *uxa_screen = uxa_get_screen(screen);
PicturePtr localDst = pDst;
int xDst_copy, yDst_copy;
int xDst_copy = 0, yDst_copy = 0;
assert(op == PictOpOver);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment