summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-10 17:53:35 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-10 18:13:30 -0800
commite1e06b461d7e7b9896b2bd760ccd9fa4c5d72526 (patch)
tree522ee63dff4c391353a445eb915e16c19917c936
parent4ceb83fad85b836622793807f3dc0cfdb5bbb000 (diff)
Fix -Wdeclaration-after-statement warning in SavagePreInit()
savage_driver.c: In function ‘SavagePreInit’: savage_driver.c:2168:13: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 2168 | XF86ModReqInfo req; | ^~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/savage_driver.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c
index 0697236..0b7b02a 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -2161,10 +2161,9 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
}
if( !psav->NoAccel ) {
- const char *modName = NULL;
-
if (psav->useEXA) {
- modName = "exa";
+ const char *modName = "exa";
+
XF86ModReqInfo req;
int errmaj, errmin;
memset(&req, 0, sizeof(req));
@@ -2180,7 +2179,8 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
}
} else {
- modName = "xaa";
+ const char *modName = "xaa";
+
if( !xf86LoadSubModule(pScrn, modName) ) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Falling back to shadowfb\n");