[cairo-commit] cairo/pixman/src fbcompose.c, 1.2, 1.3 fbpict.c, 1.4, 1.5 icbltone.c, 1.12, 1.13 icimage.c, 1.31, 1.32 icrect.c, 1.18, 1.19 ictrap.c, 1.26, 1.27

Billy Biggs commit at pdx.freedesktop.org
Sun Aug 28 12:32:59 EST 2005


Committed by: vektor

Update of /cvs/cairo/cairo/pixman/src
In directory gabe:/tmp/cvs-serv22447/src

Modified Files:
	fbcompose.c fbpict.c icbltone.c icimage.c icrect.c ictrap.c 
Log Message:
	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.



Index: fbcompose.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/fbcompose.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fbcompose.c	19 Aug 2005 01:46:30 -0000	1.2
+++ fbcompose.c	28 Aug 2005 02:32:57 -0000	1.3
@@ -585,7 +585,7 @@
     case PICT_a1: return  fbFetch_a1;
     case PICT_g1: return  fbFetch_g1;
     default:
-        return 0;
+        return NULL;
     }
 }
 
@@ -1013,7 +1013,7 @@
     case PICT_a1: return  fbFetchPixel_a1;
     case PICT_g1: return  fbFetchPixel_g1;
     default:
-        return 0;
+        return NULL;
     }
 }
 
@@ -1449,7 +1449,7 @@
     case PICT_a1: return  fbStore_a1;
     case PICT_g1: return  fbStore_g1;
     default:
-        return 0;
+        return NULL;
     }
 }
 
@@ -1953,7 +1953,7 @@
 static CombineFuncU fbCombineFuncU[] = {
     fbCombineClear,
     fbCombineSrcU,
-    0, /* CombineDst */
+    NULL, /* CombineDst */
     fbCombineOverU,
     fbCombineOverReverseU,
     fbCombineInU,
@@ -1965,11 +1965,11 @@
     fbCombineXorU,
     fbCombineAddU,
     fbCombineSaturateU,
-    0,
-    0,
+    NULL,
+    NULL,
     fbCombineClear,
     fbCombineSrcU,
-    0, /* CombineDst */
+    NULL, /* CombineDst */
     fbCombineDisjointOverU,
     fbCombineSaturateU, /* DisjointOverReverse */
     fbCombineDisjointInU,
@@ -1979,13 +1979,13 @@
     fbCombineDisjointAtopU,
     fbCombineDisjointAtopReverseU,
     fbCombineDisjointXorU,
-    0,
-    0,
-    0,
-    0,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
     fbCombineClear,
     fbCombineSrcU,
-    0, /* CombineDst */
+    NULL, /* CombineDst */
     fbCombineConjointOverU,
     fbCombineConjointOverReverseU,
     fbCombineConjointInU,
@@ -2574,7 +2574,7 @@
 static CombineFuncC fbCombineFuncC[] = {
     fbCombineClearC,
     fbCombineSrcC,
-    0, /* Dest */
+    NULL, /* Dest */
     fbCombineOverC,
     fbCombineOverReverseC,
     fbCombineInC,
@@ -2586,11 +2586,11 @@
     fbCombineXorC,
     fbCombineAddC,
     fbCombineSaturateC,
-    0,
-    0,
+    NULL,
+    NULL,
     fbCombineClearC,	    /* 0x10 */
     fbCombineSrcC,
-    0, /* Dest */
+    NULL, /* Dest */
     fbCombineDisjointOverC,
     fbCombineSaturateC, /* DisjointOverReverse */
     fbCombineDisjointInC,
@@ -2600,13 +2600,13 @@
     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 @@
 #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 @@
 #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 @@
 #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 @@
 #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 @@
 #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 @@
 #ifdef PIXMAN_INDEXED_FORMATS
     aindexed = (miIndexedPtr) pict->alphaMap->pFormat->index.devPrivate;
 #else
-    aindexed = 0;
+    aindexed = NULL;
 #endif
 
     ax = x;
@@ -3452,10 +3452,10 @@
     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 @@
         else
             fetchMask = fbFetchTransformed;
     } else {
-        fetchMask = 0;
+        fetchMask = NULL;
     }
 
     if (data->dest->alphaMap) {
@@ -3508,7 +3508,7 @@
         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 @@
                 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) {

Index: fbpict.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/fbpict.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fbpict.c	22 Aug 2005 03:49:47 -0000	1.4
+++ fbpict.c	28 Aug 2005 02:32:57 -0000	1.5
@@ -1360,7 +1360,7 @@
     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;

Index: icbltone.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/icbltone.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- icbltone.c	25 Jun 2005 22:03:17 -0000	1.12
+++ icbltone.c	28 Aug 2005 02:32:57 -0000	1.13
@@ -130,7 +130,7 @@
     case 32:
 	return fb32Lane;
     }
-    return 0;
+    return NULL;
 }
 #endif
 
@@ -233,11 +233,11 @@
     /*
      * 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

Index: icimage.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/icimage.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- icimage.c	14 Jul 2005 18:41:01 -0000	1.31
+++ icimage.c	28 Aug 2005 02:32:57 -0000	1.32
@@ -120,13 +120,13 @@
     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 @@
     image->transform = NULL;
 
     image->filter = PIXMAN_FILTER_NEAREST;
-    image->filter_params = 0;
+    image->filter_params = NULL;
     image->filter_nparams = 0;
 
 
@@ -175,7 +175,7 @@
     } };
 
     if (transform && memcmp (transform, &identity, sizeof (pixman_transform_t)) == 0)
-	transform = 0;
+	transform = NULL;
     
     if (transform)
     {
@@ -192,7 +192,7 @@
 	if (image->transform)
 	{
 	    free (image->transform);
-	    image->transform = 0;
+	    image->transform = NULL;
 	}
     }
     return 0;

Index: icrect.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/icrect.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- icrect.c	21 Aug 2005 04:28:57 -0000	1.18
+++ icrect.c	28 Aug 2005 02:32:57 -0000	1.19
@@ -350,7 +350,7 @@
 
 	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,

Index: ictrap.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/ictrap.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- ictrap.c	25 Jun 2005 03:13:19 -0000	1.26
+++ ictrap.c	28 Aug 2005 02:32:57 -0000	1.27
@@ -34,7 +34,7 @@
     int own_format = 0;
 
     if (width > 32767 || height > 32767)
-	return 0;
+	return NULL;
 
     if (!format)
     {
@@ -44,7 +44,7 @@
 	else
 	    format = pixman_format_create (PIXMAN_FORMAT_NAME_A8);
 	if (!format)
-	    return 0;
+	    return NULL;
     }
 
     image = pixman_image_create (format, width, height); 



More information about the cairo-commit mailing list