[PATCH xf86-video-trident 1/4] Add braces to for loops inside tridenthelper.c
Kevin Brace
kevinbrace at gmx.com
Sat May 11 03:22:21 UTC 2019
Newer versions of gcc give warnings, so this fix suppresses the
warnings.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
src/tridenthelper.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/tridenthelper.c b/src/tridenthelper.c
index b1fc739..2237db9 100644
--- a/src/tridenthelper.c
+++ b/src/tridenthelper.c
@@ -303,16 +303,17 @@ TGUISetMCLK(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 *b)
freq = clock;
if (!pTrident->HasSGRAM) {
- for (k=0;k<=endk;k++)
- for (n=startn;n<=endn;n++)
+ for (k=0;k<=endk;k++) {
+ for (n=startn;n<=endn;n++) {
for (m=1;m<=endm;m++) {
ffreq = ((((n+8)*pTrident->frequency)/((m+2)*powerup[k]))*1000);
- if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff))
- {
+ if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff)) {
clock_diff = (freq > ffreq) ? freq - ffreq : ffreq - freq;
p = n; q = m; r = k; s = ffreq;
- }
- }
+ }
+ }
+ }
+ }
if (s == 0)
{
--
2.17.1
More information about the xorg-devel
mailing list