diff options
-rw-r--r-- | pixman/ChangeLog | 15 | ||||
-rw-r--r-- | pixman/src/fbcompose.c | 66 | ||||
-rw-r--r-- | pixman/src/fbpict.c | 4 | ||||
-rw-r--r-- | pixman/src/icbltone.c | 6 | ||||
-rw-r--r-- | pixman/src/icimage.c | 10 | ||||
-rw-r--r-- | pixman/src/icrect.c | 2 | ||||
-rw-r--r-- | pixman/src/ictrap.c | 6 |
7 files changed, 62 insertions, 47 deletions
diff --git a/pixman/ChangeLog b/pixman/ChangeLog index c4cd4c6dd..d81411211 100644 --- a/pixman/ChangeLog +++ b/pixman/ChangeLog @@ -1,3 +1,18 @@ +2005-08-27 Billy Biggs <vektor@dumbterm.net> + + Some fixes for warnings from sparse (Part of bug #4208, + Kjartan Maraas) + + * src/fbcompose.c (fetchProcForPicture), + (fetchPixelProcForPicture), (storeProcForPicture), (fbFetchSolid), + (fbFetch), (fbFetchTransformed), (fbStore), (fbStoreExternalAlpha), + (fbCompositeRect): + * src/fbpict.c (pixman_composite): + * src/icbltone.c (fbLaneTable), (fbBltOne): + * src/icimage.c (pixman_image_init), (pixman_image_set_transform): + * src/icrect.c (pixman_fill_rectangles): + * src/ictrap.c (FbCreateAlphaPicture): Use NULL not 0. + 2005-08-27 Owen Taylor <otaylor@redhat.com> * src/fbmmx.c (detectCPUFeatures): Make the code work with diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c index 70859c65d..ada7249eb 100644 --- a/pixman/src/fbcompose.c +++ b/pixman/src/fbcompose.c @@ -585,7 +585,7 @@ static fetchProc fetchProcForPicture (PicturePtr pict) case PICT_a1: return fbFetch_a1; case PICT_g1: return fbFetch_g1; default: - return 0; + return NULL; } } @@ -1013,7 +1013,7 @@ static fetchPixelProc fetchPixelProcForPicture (PicturePtr pict) case PICT_a1: return fbFetchPixel_a1; case PICT_g1: return fbFetchPixel_g1; default: - return 0; + return NULL; } } @@ -1449,7 +1449,7 @@ static storeProc storeProcForPicture (PicturePtr pict) case PICT_a1: return fbStore_a1; case PICT_g1: return fbStore_g1; default: - return 0; + return NULL; } } @@ -1953,7 +1953,7 @@ fbCombineConjointXorU (CARD32 *dest, const CARD32 *src, int width) static CombineFuncU fbCombineFuncU[] = { fbCombineClear, fbCombineSrcU, - 0, /* CombineDst */ + NULL, /* CombineDst */ fbCombineOverU, fbCombineOverReverseU, fbCombineInU, @@ -1965,11 +1965,11 @@ static CombineFuncU fbCombineFuncU[] = { fbCombineXorU, fbCombineAddU, fbCombineSaturateU, - 0, - 0, + NULL, + NULL, fbCombineClear, fbCombineSrcU, - 0, /* CombineDst */ + NULL, /* CombineDst */ fbCombineDisjointOverU, fbCombineSaturateU, /* DisjointOverReverse */ fbCombineDisjointInU, @@ -1979,13 +1979,13 @@ static CombineFuncU fbCombineFuncU[] = { fbCombineDisjointAtopU, fbCombineDisjointAtopReverseU, fbCombineDisjointXorU, - 0, - 0, - 0, - 0, + NULL, + NULL, + NULL, + NULL, fbCombineClear, fbCombineSrcU, - 0, /* CombineDst */ + NULL, /* CombineDst */ fbCombineConjointOverU, fbCombineConjointOverReverseU, fbCombineConjointInU, @@ -2574,7 +2574,7 @@ fbCombineConjointXorC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) static CombineFuncC fbCombineFuncC[] = { fbCombineClearC, fbCombineSrcC, - 0, /* Dest */ + NULL, /* Dest */ fbCombineOverC, fbCombineOverReverseC, fbCombineInC, @@ -2586,11 +2586,11 @@ static CombineFuncC fbCombineFuncC[] = { fbCombineXorC, fbCombineAddC, fbCombineSaturateC, - 0, - 0, + NULL, + NULL, fbCombineClearC, /* 0x10 */ fbCombineSrcC, - 0, /* Dest */ + NULL, /* Dest */ fbCombineDisjointOverC, fbCombineSaturateC, /* DisjointOverReverse */ fbCombineDisjointInC, @@ -2600,13 +2600,13 @@ static CombineFuncC fbCombineFuncC[] = { fbCombineDisjointAtopC, fbCombineDisjointAtopReverseC, fbCombineDisjointXorC, /* 0x1b */ - 0, - 0, - 0, - 0, + NULL, + NULL, + NULL, + NULL, fbCombineClearC, fbCombineSrcC, - 0, /* Dest */ + NULL, /* Dest */ fbCombineConjointOverC, fbCombineConjointOverReverseC, fbCombineConjointInC, @@ -2638,7 +2638,7 @@ static void fbFetchSolid(PicturePtr pict, int x, int y, int width, CARD32 *buffe #ifdef PIXMAN_INDEXED_FORMATS miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate; #else - miIndexedPtr indexed = 0; + miIndexedPtr indexed = NULL; #endif fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff); @@ -2661,7 +2661,7 @@ static void fbFetch(PicturePtr pict, int x, int y, int width, CARD32 *buffer) #ifdef PIXMAN_INDEXED_FORMATS miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate; #else - miIndexedPtr indexed = 0; + miIndexedPtr indexed = NULL; #endif fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff); @@ -2903,7 +2903,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 #ifdef PIXMAN_INDEXED_FORMATS miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate; #else - miIndexedPtr indexed = 0; + miIndexedPtr indexed = NULL; #endif Bool projective = FALSE; @@ -3384,7 +3384,7 @@ static void fbStore(PicturePtr pict, int x, int y, int width, CARD32 *buffer) #ifdef PIXMAN_INDEXED_FORMATS miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate; #else - miIndexedPtr indexed = 0; + miIndexedPtr indexed = NULL; #endif fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff); @@ -3407,7 +3407,7 @@ static void fbStoreExternalAlpha(PicturePtr pict, int x, int y, int width, CARD3 #ifdef PIXMAN_INDEXED_FORMATS miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate; #else - miIndexedPtr indexed = 0; + miIndexedPtr indexed = NULL; #endif miIndexedPtr aindexed; @@ -3421,7 +3421,7 @@ static void fbStoreExternalAlpha(PicturePtr pict, int x, int y, int width, CARD3 #ifdef PIXMAN_INDEXED_FORMATS aindexed = (miIndexedPtr) pict->alphaMap->pFormat->index.devPrivate; #else - aindexed = 0; + aindexed = NULL; #endif ax = x; @@ -3452,10 +3452,10 @@ fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer) CARD32 *dest_buffer = src_buffer + data->width; int i; scanStoreProc store; - scanFetchProc fetchSrc = 0, fetchMask = 0, fetchDest = 0; + scanFetchProc fetchSrc = NULL, fetchMask = NULL, fetchDest = NULL; if (data->op == PIXMAN_OPERATOR_CLEAR) - fetchSrc = 0; + fetchSrc = NULL; else if (!data->src->pDrawable) { #ifdef PIXMAN_GRADIENTS if (data->src->pSourcePict) @@ -3497,7 +3497,7 @@ fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer) else fetchMask = fbFetchTransformed; } else { - fetchMask = 0; + fetchMask = NULL; } if (data->dest->alphaMap) { @@ -3508,7 +3508,7 @@ fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer) store = fbStore; } if (data->op == PIXMAN_OPERATOR_CLEAR || data->op == PIXMAN_OPERATOR_SRC) - fetchDest = 0; + fetchDest = NULL; if (fetchSrc && fetchMask && data->mask && data->mask->componentAlpha && PICT_FORMAT_RGB(data->mask->format_code)) { CARD32 *mask_buffer = dest_buffer + data->width; @@ -3544,8 +3544,8 @@ fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer) fetchMask(data->mask, data->xMask, data->yMask, data->width, dest_buffer); composeFunctions.combineMaskU(src_buffer, dest_buffer, data->width); } - fetchSrc = 0; - fetchMask = 0; + fetchSrc = NULL; + fetchMask = NULL; } for (i = 0; i < data->height; ++i) { diff --git a/pixman/src/fbpict.c b/pixman/src/fbpict.c index e5862fb11..4c10bc994 100644 --- a/pixman/src/fbpict.c +++ b/pixman/src/fbpict.c @@ -1,5 +1,5 @@ /* - * $Id: fbpict.c,v 1.4 2005-08-22 03:49:47 vektor Exp $ + * $Id: fbpict.c,v 1.5 2005-08-28 02:32:57 vektor Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -1360,7 +1360,7 @@ pixman_composite (pixman_operator_t op, pixman_region16_t *region; int n; pixman_box16_t *pbox; - CompositeFunc func = 0; + CompositeFunc func = NULL; Bool srcRepeat = pSrc->pDrawable && pSrc->repeat == RepeatNormal; Bool maskRepeat = FALSE; Bool srcTransform = pSrc->transform != 0; diff --git a/pixman/src/icbltone.c b/pixman/src/icbltone.c index 58f6e19d8..30e647779 100644 --- a/pixman/src/icbltone.c +++ b/pixman/src/icbltone.c @@ -130,7 +130,7 @@ fbLaneTable(int bpp) case 32: return fb32Lane; } - return 0; + return NULL; } #endif @@ -233,11 +233,11 @@ fbBltOne (FbStip *src, /* * Get pointer to stipple mask array for this depth */ - fbBits = 0; /* unused */ + fbBits = NULL; /* unused */ if (pixelsPerDst <= 8) fbBits = fbStippleTable(pixelsPerDst); #ifndef FBNOPIXADDR - fbLane = 0; + fbLane = NULL; if (transparent && fgand == 0 && dstBpp >= 8) fbLane = fbLaneTable(dstBpp); #endif diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c index 86db4416b..83f04ff2b 100644 --- a/pixman/src/icimage.c +++ b/pixman/src/icimage.c @@ -120,13 +120,13 @@ pixman_image_init (pixman_image_t *image) image->componentAlpha = 0; image->compositeClipSource = 0; - image->alphaMap = 0; + image->alphaMap = NULL; image->alphaOrigin.x = 0; image->alphaOrigin.y = 0; image->clipOrigin.x = 0; image->clipOrigin.y = 0; - image->clientClip = 0; + image->clientClip = NULL; image->dither = 0L; @@ -148,7 +148,7 @@ pixman_image_init (pixman_image_t *image) image->transform = NULL; image->filter = PIXMAN_FILTER_NEAREST; - image->filter_params = 0; + image->filter_params = NULL; image->filter_nparams = 0; @@ -175,7 +175,7 @@ pixman_image_set_transform (pixman_image_t *image, } }; if (transform && memcmp (transform, &identity, sizeof (pixman_transform_t)) == 0) - transform = 0; + transform = NULL; if (transform) { @@ -192,7 +192,7 @@ pixman_image_set_transform (pixman_image_t *image, if (image->transform) { free (image->transform); - image->transform = 0; + image->transform = NULL; } } return 0; diff --git a/pixman/src/icrect.c b/pixman/src/icrect.c index 24512f4f2..057498f62 100644 --- a/pixman/src/icrect.c +++ b/pixman/src/icrect.c @@ -350,7 +350,7 @@ pixman_fill_rectangles (pixman_operator_t op, while (nRects--) { - pixman_composite (op, src, 0, dst, 0, 0, 0, 0, + pixman_composite (op, src, NULL, dst, 0, 0, 0, 0, rects->x, rects->y, rects->width, diff --git a/pixman/src/ictrap.c b/pixman/src/ictrap.c index b4eedc85c..0ac51ca09 100644 --- a/pixman/src/ictrap.c +++ b/pixman/src/ictrap.c @@ -1,5 +1,5 @@ /* - * $Id: ictrap.c,v 1.26 2005-06-25 03:13:19 jrmuizel Exp $ + * $Id: ictrap.c,v 1.27 2005-08-28 02:32:57 vektor Exp $ * * Copyright © 2002 Keith Packard * @@ -34,7 +34,7 @@ FbCreateAlphaPicture (pixman_image_t *dst, int own_format = 0; if (width > 32767 || height > 32767) - return 0; + return NULL; if (!format) { @@ -44,7 +44,7 @@ FbCreateAlphaPicture (pixman_image_t *dst, else format = pixman_format_create (PIXMAN_FORMAT_NAME_A8); if (!format) - return 0; + return NULL; } image = pixman_image_create (format, width, height); |