EXA: Fix some issues pointed out by clang.

Remove dead variables, fix use of uninitialized values, that kind of thing.
This commit is contained in:
Michel Dänzer 2009-09-23 08:24:06 +02:00
parent 824a09d856
commit 096f21bb7a
3 changed files with 8 additions and 10 deletions

View File

@ -701,7 +701,6 @@ exaGlyphs (CARD8 op,
GlyphListPtr list, GlyphListPtr list,
GlyphPtr *glyphs) GlyphPtr *glyphs)
{ {
PicturePtr pPicture;
PixmapPtr pMaskPixmap = 0; PixmapPtr pMaskPixmap = 0;
PicturePtr pMask = NULL; PicturePtr pMask = NULL;
ScreenPtr pScreen = pDst->pDrawable->pScreen; ScreenPtr pScreen = pDst->pDrawable->pScreen;
@ -803,7 +802,6 @@ exaGlyphs (CARD8 op,
while (n--) while (n--)
{ {
glyph = *glyphs++; glyph = *glyphs++;
pPicture = GlyphPicture (glyph)[pScreen->myNum];
if (glyph->info.width > 0 && glyph->info.height > 0) if (glyph->info.width > 0 && glyph->info.height > 0)
{ {

View File

@ -57,7 +57,7 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
PixmapPtr pPixmap; PixmapPtr pPixmap;
ExaPixmapPrivPtr pExaPixmap; ExaPixmapPrivPtr pExaPixmap;
int bpp; int bpp;
size_t paddedWidth, datasize; size_t paddedWidth;
ExaScreenPriv(pScreen); ExaScreenPriv(pScreen);
if (w > 32767 || h > 32767) if (w > 32767 || h > 32767)
@ -79,8 +79,6 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
if (paddedWidth / 4 > 32767 || h > 32767) if (paddedWidth / 4 > 32767 || h > 32767)
return NullPixmap; return NullPixmap;
datasize = h * paddedWidth;
/* We will allocate the system pixmap later if needed. */ /* We will allocate the system pixmap later if needed. */
pPixmap->devPrivate.ptr = NULL; pPixmap->devPrivate.ptr = NULL;
pExaPixmap->sys_ptr = NULL; pExaPixmap->sys_ptr = NULL;

View File

@ -266,6 +266,10 @@ exaTryDriverSolidFill(PicturePtr pSrc,
xDst += pDst->pDrawable->x; xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y; yDst += pDst->pDrawable->y;
if (pSrc->pDrawable) {
xSrc += pSrc->pDrawable->x;
ySrc += pSrc->pDrawable->y;
}
if (!miComputeCompositeRegion (&region, pSrc, NULL, pDst, if (!miComputeCompositeRegion (&region, pSrc, NULL, pDst,
xSrc, ySrc, 0, 0, xDst, yDst, xSrc, ySrc, 0, 0, xDst, yDst,
@ -277,9 +281,6 @@ exaTryDriverSolidFill(PicturePtr pSrc,
REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y); REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y);
if (pSrc->pDrawable) { if (pSrc->pDrawable) {
xSrc += pSrc->pDrawable->x;
ySrc += pSrc->pDrawable->y;
pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
pixel = exaGetPixmapFirstPixel (pSrcPix); pixel = exaGetPixmapFirstPixel (pSrcPix);
} else } else
@ -340,7 +341,8 @@ exaTryDriverCompositeRects(CARD8 op,
ExaCompositeRectPtr rects) ExaCompositeRectPtr rects)
{ {
ExaScreenPriv (pDst->pDrawable->pScreen); ExaScreenPriv (pDst->pDrawable->pScreen);
int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y; int src_off_x = 0, src_off_y = 0, mask_off_x = 0, mask_off_y = 0;
int dst_off_x, dst_off_y;
PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix; PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix;
ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix; ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix;
@ -656,7 +658,7 @@ exaTryDriverComposite(CARD8 op,
*/ */
if (pDstExaPix->accel_blocked || if (pDstExaPix->accel_blocked ||
(pSrcExaPix && pSrcExaPix->accel_blocked) || (pSrcExaPix && pSrcExaPix->accel_blocked) ||
(pMask && (pMaskExaPix->accel_blocked))) (pMaskExaPix && (pMaskExaPix->accel_blocked)))
{ {
return -1; return -1;
} }