From 1d4d63def8f0f2cb972395f3fb22283a8d79aaf7 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Sat, 12 Apr 2008 23:01:59 -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_driver.c | 18 ++++++++++-------- src/glintpcirename.h | 6 +++--- src/pm3_video.c | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/glint_driver.c b/src/glint_driver.c index 9291ae7..f48e85f 100644 --- a/src/glint_driver.c +++ b/src/glint_driver.c @@ -632,14 +632,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 +1394,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 +1496,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/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