From 5bc590bde23ce1c57015b1d9e1cc63189c37448e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 12 Dec 2011 16:49:34 -0800 Subject: DoShowOptions: preserve constness of options list as we walk it Since all we do with the option list is walk down the list printing the names, there's no need to cast away its constness. Clears gcc warning: xf86Configure.c: In function 'DoShowOptions': xf86Configure.c:781:4: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer --- hw/xfree86/common/xf86Configure.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 24f367ec0..994d46fc2 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -778,7 +778,8 @@ void DoShowOptions (void) { free(vlist); for (i = 0; i < xf86NumDrivers; i++) { if (xf86DriverList[i]->AvailableOptions) { - OptionInfoPtr pOption = (OptionInfoPtr)(*xf86DriverList[i]->AvailableOptions)(0,0); + const OptionInfoRec *pOption = + (*xf86DriverList[i]->AvailableOptions)(0,0); if (! pOption) { ErrorF ("(EE) Couldn't read option table for %s driver\n", xf86DriverList[i]->driverName @@ -790,7 +791,7 @@ void DoShowOptions (void) { initData = LoaderSymbol (pSymbol); if (initData) { XF86ModuleVersionInfo *vers = initData->vers; - OptionInfoPtr p; + const OptionInfoRec *p; ErrorF ("Driver[%d]:%s[%s] {\n", i,xf86DriverList[i]->driverName,vers->vendor ); -- cgit v1.2.3