Index: ChangeLog =================================================================== RCS file: /cvs/xserver/xserver/ChangeLog,v retrieving revision 3.371 diff -p -u -r3.371 ChangeLog --- ChangeLog 28 Aug 2005 02:03:17 -0000 3.371 +++ ChangeLog 28 Aug 2005 02:35:57 -0000 @@ -1,5 +1,16 @@ 2005-08-27 Billy Biggs + Some fixes for warnings from sparse (Part of bug #4208, + Kjartan Maraas) + + * fb/fbbltone.c (fbBltOne): + * fb/fbcompose.c (fetchProcForPicture), + (fetchPixelProcForPicture), (storeProcForPicture), + (fbCompositeRect): + * fb/fbpict.c (fbComposite): Use NULL not 0. + +2005-08-27 Billy Biggs + * fb/fbmmx.c (detectCPUFeatures): Make the code work with -fomit-frame-pointer by making sure that %esp isn't modified at the point where we access output operands. (#4269, Patch from Index: fb/fbbltone.c =================================================================== RCS file: /cvs/xserver/xserver/fb/fbbltone.c,v retrieving revision 1.15 diff -p -u -r1.15 fbbltone.c --- fb/fbbltone.c 2 Mar 2005 15:30:03 -0000 1.15 +++ fb/fbbltone.c 28 Aug 2005 02:35:57 -0000 @@ -231,11 +231,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 Index: fb/fbcompose.c =================================================================== RCS file: /cvs/xserver/xserver/fb/fbcompose.c,v retrieving revision 1.36 diff -p -u -r1.36 fbcompose.c --- fb/fbcompose.c 19 Aug 2005 01:43:29 -0000 1.36 +++ fb/fbcompose.c 28 Aug 2005 02:35:59 -0000 @@ -554,7 +554,7 @@ static fetchProc fetchProcForPicture (Pi case PICT_a1: return fbFetch_a1; case PICT_g1: return fbFetch_g1; default: - return 0; + return NULL; } } @@ -982,7 +982,7 @@ static fetchPixelProc fetchPixelProcForP case PICT_a1: return fbFetchPixel_a1; case PICT_g1: return fbFetchPixel_g1; default: - return 0; + return NULL; } } @@ -1418,7 +1418,7 @@ static storeProc storeProcForPicture (Pi case PICT_a1: return fbStore_a1; case PICT_g1: return fbStore_g1; default: - return 0; + return NULL; } } @@ -1922,7 +1922,7 @@ fbCombineConjointXorU (CARD32 *dest, con static CombineFuncU fbCombineFuncU[] = { fbCombineClear, fbCombineSrcU, - 0, /* CombineDst */ + NULL, /* CombineDst */ fbCombineOverU, fbCombineOverReverseU, fbCombineInU, @@ -1934,11 +1934,11 @@ static CombineFuncU fbCombineFuncU[] = { fbCombineXorU, fbCombineAddU, fbCombineSaturateU, - 0, - 0, + NULL, + NULL, fbCombineClear, fbCombineSrcU, - 0, /* CombineDst */ + NULL, /* CombineDst */ fbCombineDisjointOverU, fbCombineSaturateU, /* DisjointOverReverse */ fbCombineDisjointInU, @@ -1948,13 +1948,13 @@ static CombineFuncU fbCombineFuncU[] = { fbCombineDisjointAtopU, fbCombineDisjointAtopReverseU, fbCombineDisjointXorU, - 0, - 0, - 0, - 0, + NULL, + NULL, + NULL, + NULL, fbCombineClear, fbCombineSrcU, - 0, /* CombineDst */ + NULL, /* CombineDst */ fbCombineConjointOverU, fbCombineConjointOverReverseU, fbCombineConjointInU, @@ -2543,7 +2543,7 @@ fbCombineConjointXorC (CARD32 *dest, CAR static CombineFuncC fbCombineFuncC[] = { fbCombineClearC, fbCombineSrcC, - 0, /* Dest */ + NULL, /* Dest */ fbCombineOverC, fbCombineOverReverseC, fbCombineInC, @@ -2555,11 +2555,11 @@ static CombineFuncC fbCombineFuncC[] = { fbCombineXorC, fbCombineAddC, fbCombineSaturateC, - 0, - 0, + NULL, + NULL, fbCombineClearC, /* 0x10 */ fbCombineSrcC, - 0, /* Dest */ + NULL, /* Dest */ fbCombineDisjointOverC, fbCombineSaturateC, /* DisjointOverReverse */ fbCombineDisjointInC, @@ -2569,13 +2569,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, @@ -3396,10 +3396,10 @@ fbCompositeRect (const FbComposeData *da 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 == PictOpClear) - fetchSrc = 0; + fetchSrc = NULL; else if (!data->src->pDrawable) { if (data->src->pSourcePict) fetchSrc = fbFetchSourcePict; @@ -3427,7 +3427,7 @@ fbCompositeRect (const FbComposeData *da else fetchMask = fbFetchTransformed; } else { - fetchMask = 0; + fetchMask = NULL; } if (data->dest->alphaMap) { @@ -3438,7 +3438,7 @@ fbCompositeRect (const FbComposeData *da store = fbStore; } if (data->op == PictOpClear || data->op == PictOpSrc) - fetchDest = 0; + fetchDest = NULL; if (fetchSrc && fetchMask && data->mask && data->mask->componentAlpha && PICT_FORMAT_RGB(data->mask->format)) { CARD32 *mask_buffer = dest_buffer + data->width; @@ -3474,8 +3474,8 @@ fbCompositeRect (const FbComposeData *da 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: fb/fbpict.c =================================================================== RCS file: /cvs/xserver/xserver/fb/fbpict.c,v retrieving revision 1.42 diff -p -u -r1.42 fbpict.c --- fb/fbpict.c 22 Aug 2005 03:53:20 -0000 1.42 +++ fb/fbpict.c 28 Aug 2005 02:35:59 -0000 @@ -1360,7 +1360,7 @@ fbComposite (CARD8 op, RegionRec region; int n; BoxPtr pbox; - CompositeFunc func = 0; + CompositeFunc func = NULL; Bool srcRepeat = pSrc->pDrawable && pSrc->repeat == RepeatNormal; Bool maskRepeat = FALSE; Bool srcTransform = pSrc->transform != 0;