dix/mi: still more warning fixes

Fix up prototypes for PrintChildren and PrintWindowTree in the dix.
Make miPrintRegion be unconditionally defined, and move the prototype into
regionstr.h.
Change a bunch of ScreenPtr pScreen = foo; to
ScreenPtr pScreen; pScreen = foo; in window.c, so we avoid unused variable
references (as inline REGION_* doesn't reference pScreen).
This commit is contained in:
Daniel Stone 2006-11-04 21:38:31 +02:00 committed by Daniel Stone
parent 3a9b964258
commit c3ea1f7db4
3 changed files with 19 additions and 12 deletions

View File

@ -187,7 +187,7 @@ _X_EXPORT int deltaSaveUndersViewable = 0;
* For debugging only
******/
int
static void
PrintChildren(WindowPtr p1, int indent)
{
WindowPtr p2;
@ -197,14 +197,15 @@ PrintChildren(WindowPtr p1, int indent)
{
p2 = p1->firstChild;
for (i=0; i<indent; i++) ErrorF( " ");
ErrorF( "%x\n", p1->drawable.id);
ErrorF( "%lx\n", p1->drawable.id);
miPrintRegion(&p1->clipList);
PrintChildren(p2, indent+4);
p1 = p1->nextSib;
}
}
PrintWindowTree()
static void
PrintWindowTree(void)
{
int i;
WindowPtr pWin, p1;
@ -547,9 +548,11 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
register int x, register int y,
register int w, register int h)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
ScreenPtr pScreen;
BoxRec box;
pScreen = pWin->drawable.pScreen;
box = *(REGION_EXTENTS(pScreen, &pWin->winSize));
/* we do these calculations to avoid overflows */
if (x > box.x1)
@ -1663,7 +1666,8 @@ CreateUnclippedWinSize (register WindowPtr pWin)
pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
ScreenPtr pScreen;
pScreen = pWin->drawable.pScreen;
REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x,
- pWin->drawable.y);
@ -1699,7 +1703,8 @@ SetWinSize (register WindowPtr pWin)
(int)pWin->drawable.height);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
ScreenPtr pScreen;
pScreen = pWin->drawable.pScreen;
REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x,
- pWin->drawable.y);
@ -1741,7 +1746,8 @@ SetBorderSize (register WindowPtr pWin)
(int)(pWin->drawable.height + (bw<<1)));
#ifdef SHAPE
if (wBoundingShape (pWin)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
ScreenPtr pScreen;
pScreen = pWin->drawable.pScreen;
REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x,
- pWin->drawable.y);
@ -1952,7 +1958,8 @@ MakeBoundingRegion (
BoxPtr pBox)
{
RegionPtr pRgn;
ScreenPtr pScreen = pWin->drawable.pScreen;
ScreenPtr pScreen;
pScreen = pWin->drawable.pScreen;
pRgn = REGION_CREATE(pScreen, pBox, 1);
if (wBoundingShape (pWin)) {

View File

@ -321,4 +321,7 @@ extern void miRegionEmpty(
extern BoxPtr miRegionExtents(
RegionPtr /*pReg*/);
extern void miPrintRegion(
RegionPtr /*pReg*/);
#endif /* REGIONSTRUCT_H */

View File

@ -223,8 +223,7 @@ _X_EXPORT RegDataRec miEmptyData = {0, 0};
RegDataRec miBrokenData = {0, 0};
RegionRec miBrokenRegion = { { 0, 0, 0, 0 }, &miBrokenData };
#ifdef DEBUG
int
_X_EXPORT void
miPrintRegion(rgn)
RegionPtr rgn;
{
@ -242,9 +241,7 @@ miPrintRegion(rgn)
ErrorF("%d %d %d %d \n",
rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2);
ErrorF("\n");
return(num);
}
#endif /* DEBUG */
_X_EXPORT Bool
miRegionEqual(reg1, reg2)