From b4d5c27bc5923f16a760c6dd843429b62abc4b44 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Thu, 13 Mar 2008 16:42:06 -0300 Subject: [PATCH] Compile warning fixes. The casts for printf format are really required to pass proper arguments, as pciaddr_t is a 64 bit integer. --- src/i128IBMDAC.c | 1 + src/i128_driver.c | 34 +++++++++++++++++----------------- src/i128accel.c | 6 ++++-- src/i128exa.c | 2 ++ src/i128init.c | 2 ++ src/i128pcirename.h | 6 +++--- 6 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/i128IBMDAC.c b/src/i128IBMDAC.c index 8e83e2b..027abe7 100644 --- a/src/i128IBMDAC.c +++ b/src/i128IBMDAC.c @@ -37,6 +37,7 @@ #include "i128reg.h" #include "IBMRGB.h" +#include static void I128IBMShowCursor(ScrnInfoPtr pScrn); static void I128IBMHideCursor(ScrnInfoPtr pScrn); diff --git a/src/i128_driver.c b/src/i128_driver.c index 40fdf54..657012b 100644 --- a/src/i128_driver.c +++ b/src/i128_driver.c @@ -800,7 +800,7 @@ I128PreInit(ScrnInfoPtr pScrn, int flags) { unsigned short temp; pci_device_cfg_read_u16(pI128->PciInfo, &temp, 0x4); - if ((temp & 0x03 == 0x03) && (PCI_SUB_DEVICE_ID(pI128->PciInfo) == 0x08)) + if (((temp & 0x03) == 0x03) && (PCI_SUB_DEVICE_ID(pI128->PciInfo) == 0x08)) pI128->MemoryType = I128_MEMORY_DRAM; } #endif @@ -2108,38 +2108,38 @@ I128DumpBaseRegisters(ScrnInfoPtr pScrn) " PCI Registers\n"); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " MW0_AD 0x%08lx addr 0x%08lx %spre-fetchable\n", - PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM), - PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM) & 0xFFC00000, + (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM), + (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM) & 0xFFC00000), PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM) & 0x8 ? "" : "not-"); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " MW1_AD 0x%08lx addr 0x%08lx %spre-fetchable\n", - PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM), - PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM) & 0xFFC00000, + (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM), + (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM) & 0xFFC00000), PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM) & 0x8 ? "" : "not-"); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " XYW_AD(A) 0x%08lx addr 0x%08lx\n", - PCI_REGION_BASE(pI128->PciInfo, 2, REGION_MEM), - PCI_REGION_BASE(pI128->PciInfo, 2, REGION_MEM) & 0xFFC00000); + (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 2, REGION_MEM), + (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 2, REGION_MEM) & 0xFFC00000)); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " XYW_AD(B) 0x%08lx addr 0x%08lx\n", - PCI_REGION_BASE(pI128->PciInfo, 3, REGION_MEM), - PCI_REGION_BASE(pI128->PciInfo, 3, REGION_MEM) & 0xFFC00000); + (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 3, REGION_MEM), + (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 3, REGION_MEM) & 0xFFC00000)); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " RBASE_G 0x%08lx addr 0x%08lx\n", - PCI_REGION_BASE(pI128->PciInfo, 4, REGION_MEM), - PCI_REGION_BASE(pI128->PciInfo, 4, REGION_MEM) & 0xFFFF0000); + (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 4, REGION_MEM), + (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 4, REGION_MEM) & 0xFFFF0000)); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " IO 0x%08lx addr 0x%08lx\n", - PCI_REGION_BASE(pI128->PciInfo, 5, REGION_IO), - PCI_REGION_BASE(pI128->PciInfo, 5, REGION_IO) & 0xFFFFFF00); + (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 5, REGION_IO), + (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 5, REGION_IO) & 0xFFFFFF00)); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " SSC 0x%08x addr 0x%08x\n", - PCI_SUB_DEVICE_ID(pI128->PciInfo), - PCI_SUB_DEVICE_ID(pI128->PciInfo) & 0xFFFFFF00); + (unsigned int)PCI_SUB_DEVICE_ID(pI128->PciInfo), + (unsigned int)(PCI_SUB_DEVICE_ID(pI128->PciInfo) & 0xFFFFFF00)); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " SSV 0x%08x addr 0x%08x\n", - PCI_SUB_VENDOR_ID(pI128->PciInfo), - PCI_SUB_VENDOR_ID(pI128->PciInfo) & 0xFFFFFF00); + (unsigned int)PCI_SUB_VENDOR_ID(pI128->PciInfo), + (unsigned int)(PCI_SUB_VENDOR_ID(pI128->PciInfo) & 0xFFFFFF00)); #ifndef XSERVER_LIBPCIACCESS xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " RBASE_E 0x%08lx addr 0x%08lx %sdecode-enabled\n\n", diff --git a/src/i128accel.c b/src/i128accel.c index 5b29552..b75e573 100644 --- a/src/i128accel.c +++ b/src/i128accel.c @@ -57,9 +57,11 @@ static void I128SetClippingRectangle(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); static void I128FillSolidRects(ScrnInfoPtr pScrn, int fg, int rop, unsigned int planemask, int nBox, register BoxPtr pBoxI); +#if 0 static void I128ScreenToScreenBitBlt(ScrnInfoPtr pScrn, int nbox, DDXPointPtr pptSrc, BoxPtr pbox, int xdir, int ydir, int alu, unsigned planemask); +#endif #define ENG_PIPELINE_READY() { while (pI128->mem.rbase_a[BUSY] & BUSY_BUSY) ; } #define ENG_DONE() { while (pI128->mem.rbase_a[FLOW] & (FLOW_DEB | FLOW_MCB | FLOW_PRV)) ;} @@ -397,7 +399,7 @@ I128FillSolidRects(ScrnInfoPtr pScrn, int fg, int rop, unsigned int planemask, } - +#if 0 static void I128ScreenToScreenBitBlt(ScrnInfoPtr pScrn, int nbox, DDXPointPtr pptSrc, BoxPtr pbox, int xdir, int ydir, int alu, unsigned planemask) @@ -409,7 +411,7 @@ I128ScreenToScreenBitBlt(ScrnInfoPtr pScrn, int nbox, DDXPointPtr pptSrc, pbox->x1, pbox->y1, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); ENG_DONE(); } - +#endif Bool I128XaaInit(ScreenPtr pScreen) diff --git a/src/i128exa.c b/src/i128exa.c index 36aa78f..84452a8 100644 --- a/src/i128exa.c +++ b/src/i128exa.c @@ -452,11 +452,13 @@ static const struct dest_format dest_formats[] = { { 0, 0 } }; +#if 0 static struct dest_format * i128MapDestFormat(int fmt) { return NULL; } +#endif /* Composite is probably t2r and t2r4 only */ static Bool diff --git a/src/i128init.c b/src/i128init.c index 52fef07..77205be 100644 --- a/src/i128init.c +++ b/src/i128init.c @@ -39,6 +39,8 @@ #include "Ti302X.h" #include "IBMRGB.h" +#include + static void I128SavePalette(I128Ptr pI128); static void I128RestorePalette(I128Ptr pI128); diff --git a/src/i128pcirename.h b/src/i128pcirename.h index f0f5cf8..3e04b2d 100644 --- a/src/i128pcirename.h +++ b/src/i128pcirename.h @@ -26,8 +26,8 @@ * library. The main purpose being to facilitate source code compatibility. */ -#ifndef CIRPCIRENAME_H -#define CIRPCIRENAME_H +#ifndef I128PCIRENAME_H +#define I128PCIRENAME_H enum region_type { REGION_MEM, @@ -119,4 +119,4 @@ typedef struct pci_device *pciVideoPtr; #endif /* XSERVER_LIBPCIACCESS */ -#endif /* CIRPCIRENAME_H */ +#endif /* I128PCIRENAME_H */ -- 1.5.4.3