From 5a4b7a8dbf04ef1ef5770820b99f1842897afa0e Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Sat, 15 Mar 2008 23:19:19 -0300 Subject: [PATCH] Compile warning fixes. Don't declare or add to the appropriate ifdef unused variables. Change some variables from signed to unsigned or proper casting to match function prototypes. Minor consistency change in glintpcirename.h. --- src/glint_dri.c | 2 +- src/glint_driver.c | 19 +++++++++++-------- src/glintpcirename.h | 6 +++--- src/pm2_video.c | 1 - src/pm3_video.c | 2 +- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/glint_dri.c b/src/glint_dri.c index b244b73..cda0ca4 100644 --- a/src/glint_dri.c +++ b/src/glint_dri.c @@ -1921,8 +1921,8 @@ GLINTDRIMoveBuffers( RegionPtr prgnSrc, CARD32 index) { - ScreenPtr pScreen = pParent->drawable.pScreen; #if 0 + ScreenPtr pScreen = pParent->drawable.pScreen; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; #endif int dx, dy; diff --git a/src/glint_driver.c b/src/glint_driver.c index eb375ec..35b8873 100644 --- a/src/glint_driver.c +++ b/src/glint_driver.c @@ -49,6 +49,7 @@ #include "xf86int10.h" #include "dixstruct.h" #include "vbe.h" +#include "cfb8_32.h" #include "compiler.h" #include "mipointer.h" @@ -632,14 +633,16 @@ static Bool GLINTProbe(DriverPtr drv, int flags) { int i; - pciVideoPtr pPci, *checkusedPci; + pciVideoPtr pPci; GDevPtr *devSections; - int numDevSections; - int numUsed,bus,device,func; - char *dev; + int numDevSections, numUsed; int *usedChips = NULL; Bool foundScreen = FALSE; - char *name; +#ifndef XSERVER_LIBPCIACCESS + char *dev, *name; + int bus, device, func; + pciVideoPtr *checkusedPci; +#endif /* TRACE_ENTER("GLINTProbe"); @@ -1392,7 +1395,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags) pGlint->FbAddress = PCI_REGION_BASE(pGlint->MultiPciInfo[0], 2, REGION_MEM); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "FrameBuffer used from first rasterizer chip at 0x%lx\n", - PCI_REGION_BASE(pGlint->MultiPciInfo[0], 2, REGION_MEM)); + (unsigned long)PCI_REGION_BASE(pGlint->MultiPciInfo[0], 2, REGION_MEM)); } else { xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "No FrameBuffer memory - aborting\n"); @@ -1494,8 +1497,8 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags) int basecopro = PCI_REGION_BASE(pGlint->MultiPciInfo[0], 0, REGION_MEM) & 0xFFFFC000; int basedelta = PCI_REGION_BASE(pGlint->PciInfo, 0, REGION_MEM) & 0xFFFFC000; - int dummy; - int base3copro, offset; + int offset; + unsigned int base3copro, dummy; if( (basedelta & 0x20000) ^ (basecopro & 0x20000) ) { if ((pGlint->MultiChip == PCI_CHIP_PERMEDIA) || diff --git a/src/glintpcirename.h b/src/glintpcirename.h index c4beac6..0ea81c3 100644 --- a/src/glintpcirename.h +++ b/src/glintpcirename.h @@ -26,8 +26,8 @@ * library. The main purpose being to facilitate source code compatibility. */ -#ifndef SISPCIRENAME_H -#define SISPCIRENAME_H +#ifndef GLINTPCIRENAME_H +#define GLINTPCIRENAME_H enum region_type { REGION_MEM, @@ -119,4 +119,4 @@ typedef struct pci_device *pciVideoPtr; #endif /* XSERVER_LIBPCIACCESS */ -#endif /* SISPCIRENAME_H */ +#endif /* GLINTPCIRENAME_H */ diff --git a/src/pm2_video.c b/src/pm2_video.c index 46d5d74..9b86073 100644 --- a/src/pm2_video.c +++ b/src/pm2_video.c @@ -990,7 +990,6 @@ static void BlackOut(PortPrivPtr pPPriv, RegionPtr pRegion) { ScrnInfoPtr pScrn = pPPriv->pAdaptor->pScrn; - ScreenPtr pScreen = pScrn->pScreen; GLINTPtr pGlint = GLINTPTR(pScrn); RegionRec DRegion; BoxRec DBox; diff --git a/src/pm3_video.c b/src/pm3_video.c index 6f07ed3..27deb3c 100644 --- a/src/pm3_video.c +++ b/src/pm3_video.c @@ -264,7 +264,7 @@ do{ \ GLINT_WRITE_REG(data, PM3RD_IndexedData); \ }while(0) -void Permedia3ResetVideo(ScrnInfoPtr pScrn) +static void Permedia3ResetVideo(ScrnInfoPtr pScrn) { GLINTPtr pGlint = GLINTPTR(pScrn); GLINTPortPrivPtr pPriv = pGlint->adaptor->pPortPrivates[0].ptr; -- 1.5.3.2