]> granicus.if.org Git - postgresql/commitdiff
Various cleanups to satisfy -Werror, but there are some errors that I'm
authorMarc G. Fournier <scrappy@hub.org>
Wed, 19 Feb 1997 14:52:06 +0000 (14:52 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Wed, 19 Feb 1997 14:52:06 +0000 (14:52 +0000)
not certain how to fix, so left them there and enabled -Wno-error for
this directory for now

src/backend/optimizer/geqo/Makefile
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_main.c
src/backend/optimizer/geqo/geqo_misc.c
src/backend/optimizer/geqo/geqo_params.c
src/backend/optimizer/geqo/geqo_paths.c

index 61e57f6ebd6bc245d810fc04c21d6d3d8d4639a1..d90b8176a5056fb5b92e9a3b7ee0c619a05d87bb 100644 (file)
@@ -5,7 +5,7 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $Id: Makefile,v 1.1 1997/02/19 12:56:38 scrappy Exp $
+# $Id: Makefile,v 1.2 1997/02/19 14:51:55 scrappy Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -16,12 +16,12 @@ INCLUDE_OPT = -I../.. \
               -I../../port/$(PORTNAME) \
               -I../../../include
 
-CFLAGS+=$(INCLUDE_OPT)
+CFLAGS+=$(INCLUDE_OPT) -Wno-error
 
-OBJS = geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o \
-       geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o \
-       geqo_selection.o \
-       geqo_erx.o geqo_pmx.o geqo_cx.o geqo_px.o
+OBJS = geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o \
+       geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o \
+       geqo_selection.o \
+       geqo_erx.o geqo_pmx.o geqo_cx.o geqo_px.o 
 
 # not ready yet: geqo_ox1.o geqo_ox2.o
 # deprecated: minspantree.o
index ebf9a8c5188ad089171fd23a7a99135e99e5d487..94411467beba6a00e0e2a829845a6575769b9dda 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_eval.c,v 1.3 1997/02/19 14:29:22 scrappy Exp $
+ * $Id: geqo_eval.c,v 1.4 1997/02/19 14:51:57 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -40,6 +40,8 @@
 #include "optimizer/pathnode.h"
 #include "optimizer/clauses.h"
 #include "optimizer/cost.h"
+#include "optimizer/tlist.h"
+#include "optimizer/joininfo.h"
 
 #include "optimizer/geqo_gene.h"
 #include "optimizer/geqo.h"
index 6dadbb1839908b5f2f356b431cbc8b7c0f3e2540..ae05b33884e8d6135f9f5125e82f8ecf16a57052 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_main.c,v 1.1 1997/02/19 12:57:05 scrappy Exp $
+ * $Id: geqo_main.c,v 1.2 1997/02/19 14:51:59 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -66,7 +66,6 @@
 Rel *
 geqo(Query *root)
 {
- int        i,j;
  int        generation;
  Chromosome  *momma;
  Chromosome  *daddy;
@@ -76,21 +75,26 @@ geqo(Query *root)
  int edge_failures=0;
  float      difference;
 
+#if defined(CX) || defined(PX) || defined(QX1) || defined(QX2)
  City *city_table; /* list of cities */
+#endif
+
+#if defined(CX)
  int cycle_diffs=0;
+#endif 
 
+#if defined(CX) && defined(GEQO_DEBUG)
  int mutations=0;
+#endif
 
  int number_of_rels;
- List *r = NIL;
- List *rel_list = (List *) root->base_relation_list_;
 
  Pool *pool;
  int pool_size, number_generations, status_interval;
 
  Gene *best_tour;
  Rel *best_rel;
- Plan *best_plan;
+/*  Plan *best_plan; */
 
 
 /* set tour size */
index e5559e7a20c40919504671cd1ec4cb991a10c0bd..48ae78bdcda48f1bcda1232c86bd6369a5fc149a 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_misc.c,v 1.1 1997/02/19 12:57:09 scrappy Exp $
+ * $Id: geqo_misc.c,v 1.2 1997/02/19 14:52:01 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -151,7 +151,7 @@ geqo_print_path(Query *root, Path *path, int indent)
 {
     char *ptype = NULL;
     JoinPath *jp;
-    bool join;
+    bool join = false;
     int i;
 
     for(i=0; i < indent; i++)
index 47c56ba333f2e9457871eb47314535cf4f88fe81..26d5def923c2e073587059f2687503701e4dcff7 100644 (file)
@@ -5,7 +5,7 @@
 *
 * Copyright (c) 1994, Regents of the University of California
 *
-* $Id: geqo_params.c,v 1.1 1997/02/19 12:57:20 scrappy Exp $
+* $Id: geqo_params.c,v 1.2 1997/02/19 14:52:04 scrappy Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -21,6 +21,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <math.h>
+#include <ctype.h>
 
 #include "postgres.h"
 #include "miscadmin.h"
@@ -166,7 +167,7 @@ geqo_params(int string_length)
        
                                if (i != EOF)
                                {
-                                       if (sscanf (buf, "%f", &SelectionBias) == 1) selection_bias = 1;
+                                       if (sscanf (buf, "%lf", &SelectionBias) == 1) selection_bias = 1;
                                }
        
                        }
index c6a7ce512b701a8c59d3766ec0ee72592b24d7a8..e388b0e827ce6af430df2c545dfa0f923d816e30 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_paths.c,v 1.1 1997/02/19 12:57:25 scrappy Exp $
+ * $Id: geqo_paths.c,v 1.2 1997/02/19 14:52:06 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -99,7 +99,7 @@ void
 geqo_rel_paths(Rel *rel)
 {
     List *y = NIL;
-    Path *path;
+    Path *path = (Path*)NULL;
     JoinPath *cheapest = (JoinPath*)NULL;
     
        foreach(y, rel->pathlist) {