From 7f74a494d77c301ee9861bd77e2a1fa335e3b21d Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Fri, 7 Mar 2008 16:53:01 -0300 Subject: [PATCH] Ensure the driver will not compile on an environment where only libpciaccess is available. It was compiling without prototype for xf86GetPciVideoInfo, and driver loaded with it as an unresolved symbol. Other remaining compile warnings are due to REGION_INIT macro receiving a pointer to variable on the stack, and the NULL check generating a warning about the address of the variable always evaluating to true. --- src/nsc_driver.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/nsc_driver.c b/src/nsc_driver.c index f5177ed..8e24978 100644 --- a/src/nsc_driver.c +++ b/src/nsc_driver.c @@ -500,6 +500,7 @@ NscAvailableOptions(int chipid, int busid) static Bool NscProbe(DriverPtr drv, int flags) { + pciVideoPtr pdev; Bool foundScreen = FALSE; int numDevSections, numUsed; GDevPtr *devSections = NULL; @@ -517,7 +518,8 @@ NscProbe(DriverPtr drv, int flags) } GeodeDebug(("NscProbe: Before MatchPciInstances!\n")); /* PCI BUS */ - if (xf86GetPciVideoInfo()) { + pdev = xf86GetPciVideoInfo(); + if (pdev) { numUsed = xf86MatchPciInstances(NSC_NAME, PCI_VENDOR_ID_NS, GeodeChipsets, GeodePCIchipsets, devSections, numDevSections, -- 1.5.4.3