gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] compiler warnings


From: Evan Berggren Daniel
Subject: [gnugo-devel] compiler warnings
Date: Sun, 10 Nov 2002 09:48:20 -0500 (EST)

While I'm off bug hunting...

The patch below fixes three compiler warnings.  Two unused variables and
an ambiguous else.  I assume deleting the variable declarations is
appropriate.

Thanks

Evan Daniel

Index: engine/owl.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/owl.c,v
retrieving revision 1.117
diff -u -r1.117 owl.c
--- engine/owl.c        9 Nov 2002 03:44:33 -0000       1.117
+++ engine/owl.c        10 Nov 2002 14:47:10 -0000
@@ -4764,13 +4764,15 @@

       /* Following is completely ad hoc. Another set of tests might
        * very well get better results. */
-      if (after - before >= 3)
+      if (after - before >= 3) {
        if (after >= 8 || (before == 0 && after >= 5)) {
          *probable = 2;
          *max = 2;
        }
-       else if (*max < 2)
+       else if (*max < 2) {
          (*max)++;
+       }
+      }
     }
   }
 }
Index: engine/utils.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/utils.c,v
retrieving revision 1.60
diff -u -r1.60 utils.c
--- engine/utils.c      23 Oct 2002 18:32:35 -0000      1.60
+++ engine/utils.c      10 Nov 2002 14:47:10 -0000
@@ -876,7 +876,6 @@
   int k;
   int ii;
   int trouble = 0;
-  int current_verbose = verbose;
   int dragon_analyzed[4] = {0, 0, 0, 0};

   for (k = 0; k < 4; k++) {
Index: patterns/dfa.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/dfa.c,v
retrieving revision 1.18
diff -u -r1.18 dfa.c
--- patterns/dfa.c      4 Nov 2002 16:55:08 -0000       1.18
+++ patterns/dfa.c      10 Nov 2002 14:47:10 -0000
@@ -867,7 +867,6 @@
   dfa_t *old_dfa = &(aux_dfa[(aux_count+1) % DFA_BINS]);
   float ratio;
   char strrot[MAX_ORDER+1];
-  int len = strlen(str);

   if (ll == 0) {
     strcpy(strrot, str);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]