diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-01-10 18:11:12 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-01-10 18:13:30 -0800 |
commit | 9a57874a00557663e21679c40c02469f3079d953 (patch) | |
tree | b9f3e568cedb7bd10b626044431b405b21d2d293 | |
parent | 2548cd71e8f466097c2d6fbebd5bb1ba4de6cd25 (diff) |
Fix 5 -Wshadow warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/savage_driver.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c index 762226d..4313e11 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -3676,8 +3676,6 @@ static Bool SavageModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) SavageRegPtr new = &psav->ModeReg; vgaRegPtr vganew = &hwp->ModeReg; int vgaCRIndex, vgaCRReg, vgaIOBase; - int refresh; - unsigned int newmode=0, newrefresh=0; vgaIOBase = hwp->IOBase; vgaCRIndex = vgaIOBase + 4; @@ -3706,7 +3704,8 @@ static Bool SavageModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) #endif if (psav->IsSecondary) { - refresh = SavageGetRefresh(mode); + int refresh = SavageGetRefresh(mode); + unsigned int newmode=0, newrefresh=0; SavageMatchBiosMode(pScrn,mode->HDisplay,mode->VDisplay,refresh, &newmode,&newrefresh); @@ -4313,15 +4312,15 @@ void SavageLoadPaletteSavage4(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual) { SavagePtr psav = SAVPTR(pScrn); - int i, index; + int index; int updateKey = -1; VerticalRetraceWait(); - for (i=0; i<numColors; i++) { - if (!(inStatus1() & 0x08)) + for (int n = 0; n < numColors; n++) { + if (!(inStatus1() & 0x08)) VerticalRetraceWait(); - index = indices[i]; + index = indices[n]; VGAOUT8(0x3c8, index); VGAOUT8(0x3c9, colors[index].red); VGAOUT8(0x3c9, colors[index].green); |