[xf86-video-trident,1/4] Add braces to for loops inside tridenthelper.c

Submitted by Kevin Brace on May 11, 2019, 3:22 a.m.

Details

Message ID 20190511032224.5869-2-kevinbrace@gmx.com
State New
Headers show
Series "Clean up and rename tridenthelper.c" ( rev: 1 ) in X.org

Not browsing as part of any series.

Commit Message

Kevin Brace May 11, 2019, 3:22 a.m.
Newer versions of gcc give warnings, so this fix suppresses the
warnings.

Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
---
 src/tridenthelper.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--
2.17.1

Patch hide | download patch | download mbox

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)
 	{