From b570f86d432d3d24a2266e2a9a5d8ded8bbaf664 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Wed, 12 Mar 2008 18:26:21 -0300 Subject: [PATCH] Compile warning fixes. The change to call find_bios_string() using first parameter as ps3v instead of ps3v->PciTag seems to fix a genuine bug, but since it has been so for so long, it probably is a bug that was never properly tested or reproduced. Also minor consistency change in pci_rename.h. --- src/s3v_accel.c | 2 ++ src/s3v_driver.c | 6 ++---- src/s3v_pcirename.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/s3v_accel.c b/src/s3v_accel.c index faed1bd..4e74e08 100644 --- a/src/s3v_accel.c +++ b/src/s3v_accel.c @@ -38,6 +38,8 @@ in this Software without prior written authorization from the XFree86 Project. #include "servermd.h" /* LOG2_BYTES_PER_SCANLINE_PAD */ +#include + static void S3VWriteMask(CARD32*, int); static void S3VEngineReset(ScrnInfoPtr pScrn); diff --git a/src/s3v_driver.c b/src/s3v_driver.c index 79e6b54..430c78f 100644 --- a/src/s3v_driver.c +++ b/src/s3v_driver.c @@ -583,8 +583,6 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags) int i; double real; ClockRangePtr clockRanges; - char *mod = NULL; - const char *reqSym = NULL; char *s; unsigned char config1, config2, m, n, n1, n2, cr66 = 0; @@ -1240,12 +1238,12 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags) * Toshiba Tecra 5x0/7x0 seems to use 28.636 MHz * Compaq Armada 7x00 uses 14.318 MHz */ - if (find_bios_string(ps3v->PciTag, BIOS_BASE, "COMPAQ M5 BIOS", NULL) != NULL) { + if (find_bios_string(ps3v, BIOS_BASE, "COMPAQ M5 BIOS", NULL) != NULL) { if (xf86GetVerbosity()) xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "COMPAQ M5 BIOS found\n"); /* ps3v->refclk_fact = 1.0; */ } - else if (find_bios_string(ps3v->PciTag, BIOS_BASE, "TOSHIBA Video BIOS", NULL) != NULL) { + else if (find_bios_string(ps3v, BIOS_BASE, "TOSHIBA Video BIOS", NULL) != NULL) { if (xf86GetVerbosity()) xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "TOSHIBA Video BIOS found\n"); /* ps3v->refclk_fact = 2.0; */ diff --git a/src/s3v_pcirename.h b/src/s3v_pcirename.h index 9321046..1514eca 100644 --- a/src/s3v_pcirename.h +++ b/src/s3v_pcirename.h @@ -26,8 +26,8 @@ * library. The main purpose being to facilitate source code compatibility. */ -#ifndef S3PCIRENAME_H -#define S3PCIRENAME_H +#ifndef S3VPCIRENAME_H +#define S3VPCIRENAME_H enum region_type { REGION_MEM, @@ -119,4 +119,4 @@ typedef struct pci_device *pciVideoPtr; #endif /* XSERVER_LIBPCIACCESS */ -#endif /* CIRPCIRENAME_H */ +#endif /* S3VPCIRENAME_H */ -- 1.5.4.3