diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-01-07 10:09:13 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-01-07 10:10:47 -0800 |
commit | 0d0ae3fd54746ed9bed8ca96269e182187176dc8 (patch) | |
tree | 89feab25e104f7dc0423b4d2479d4961fd58e2e2 /src/mga_g450pll.c | |
parent | 3bc8e3b57e0a8e1fb437b3bdd3e9d479f43afc06 (diff) |
Fix warning: declaration of ‘ulIndex’ shadows a previous local [-Wshadow]
mga_g450pll.c: In function ‘MGAG450SetPLLFreq’:
mga_g450pll.c:326:11: warning: declaration of ‘ulIndex’ shadows a previous local [-Wshadow]
326 | int ulIndex;
| ^~~~~~~
mga_g450pll.c:312:11: note: shadowed declaration is here
312 | CARD32 ulIndex;
| ^~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/mga_g450pll.c')
-rw-r--r-- | src/mga_g450pll.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mga_g450pll.c b/src/mga_g450pll.c index ae6e1a1..c94d0c5 100644 --- a/src/mga_g450pll.c +++ b/src/mga_g450pll.c @@ -309,7 +309,6 @@ double MGAG450SetPLLFreq(ScrnInfoPtr pScrn, long f_out) CARD32 ulMaxIndex; CARD32 ulMNP; CARD32 ulMNPTable[MNP_TABLE_SIZE]; - CARD32 ulIndex; CARD32 ulTryMNP; long lCompareResult; MGAPtr pMga = MGAPTR(pScrn); @@ -323,7 +322,6 @@ double MGAG450SetPLLFreq(ScrnInfoPtr pScrn, long f_out) ulMaxIndex = 1; while(ulMNP != 0xffffffff) { - int ulIndex; Bool bSkipValue; bSkipValue = FALSE; @@ -344,6 +342,7 @@ double MGAG450SetPLLFreq(ScrnInfoPtr pScrn, long f_out) if(!bSkipValue) { + int ulIndex; for(ulIndex = ulMaxIndex; !bSkipValue && (ulIndex > 0); ulIndex--) { G450CompareMNP(pScrn, f_out, ulMNP, ulMNPTable[ulIndex - 1], @@ -374,7 +373,7 @@ double MGAG450SetPLLFreq(ScrnInfoPtr pScrn, long f_out) OUTREG8(0x1fc2, (CARD8)(ucMisc | CLKSEL_MGA)); } - for(ulIndex = 0; !bFoundValidPLL && (ulIndex < ulMaxIndex); ulIndex++) + for(CARD32 ulIndex = 0; !bFoundValidPLL && (ulIndex < ulMaxIndex); ulIndex++) { ulTryMNP = ulMNPTable[ulIndex]; |