Various cleanups to satisfy -Werror, but there are some errors that I'm

not certain how to fix, so left them there and enabled -Wno-error for
this directory for now
This commit is contained in:
Marc G. Fournier 1997-02-19 14:52:06 +00:00
parent 950c57600e
commit ee6d3a7326
6 changed files with 26 additions and 19 deletions

View File

@ -5,7 +5,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # 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../../port/$(PORTNAME) \
-I../../../include -I../../../include
CFLAGS+=$(INCLUDE_OPT) CFLAGS+=$(INCLUDE_OPT) -Wno-error
OBJS = geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.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_params.o geqo_paths.o geqo_pool.o geqo_recombination.o \
geqo_selection.o \ geqo_selection.o \
geqo_erx.o geqo_pmx.o geqo_cx.o geqo_px.o geqo_erx.o geqo_pmx.o geqo_cx.o geqo_px.o
# not ready yet: geqo_ox1.o geqo_ox2.o # not ready yet: geqo_ox1.o geqo_ox2.o
# deprecated: minspantree.o # deprecated: minspantree.o

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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/pathnode.h"
#include "optimizer/clauses.h" #include "optimizer/clauses.h"
#include "optimizer/cost.h" #include "optimizer/cost.h"
#include "optimizer/tlist.h"
#include "optimizer/joininfo.h"
#include "optimizer/geqo_gene.h" #include "optimizer/geqo_gene.h"
#include "optimizer/geqo.h" #include "optimizer/geqo.h"

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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 * Rel *
geqo(Query *root) geqo(Query *root)
{ {
int i,j;
int generation; int generation;
Chromosome *momma; Chromosome *momma;
Chromosome *daddy; Chromosome *daddy;
@ -76,21 +75,26 @@ geqo(Query *root)
int edge_failures=0; int edge_failures=0;
float difference; float difference;
#if defined(CX) || defined(PX) || defined(QX1) || defined(QX2)
City *city_table; /* list of cities */ City *city_table; /* list of cities */
int cycle_diffs=0; #endif
#if defined(CX)
int cycle_diffs=0;
#endif
#if defined(CX) && defined(GEQO_DEBUG)
int mutations=0; int mutations=0;
#endif
int number_of_rels; int number_of_rels;
List *r = NIL;
List *rel_list = (List *) root->base_relation_list_;
Pool *pool; Pool *pool;
int pool_size, number_generations, status_interval; int pool_size, number_generations, status_interval;
Gene *best_tour; Gene *best_tour;
Rel *best_rel; Rel *best_rel;
Plan *best_plan; /* Plan *best_plan; */
/* set tour size */ /* set tour size */

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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; char *ptype = NULL;
JoinPath *jp; JoinPath *jp;
bool join; bool join = false;
int i; int i;
for(i=0; i < indent; i++) for(i=0; i < indent; i++)

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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 <stdio.h>
#include <time.h> #include <time.h>
#include <math.h> #include <math.h>
#include <ctype.h>
#include "postgres.h" #include "postgres.h"
#include "miscadmin.h" #include "miscadmin.h"
@ -166,7 +167,7 @@ geqo_params(int string_length)
if (i != EOF) if (i != EOF)
{ {
if (sscanf (buf, "%f", &SelectionBias) == 1) selection_bias = 1; if (sscanf (buf, "%lf", &SelectionBias) == 1) selection_bias = 1;
} }
} }

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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) geqo_rel_paths(Rel *rel)
{ {
List *y = NIL; List *y = NIL;
Path *path; Path *path = (Path*)NULL;
JoinPath *cheapest = (JoinPath*)NULL; JoinPath *cheapest = (JoinPath*)NULL;
foreach(y, rel->pathlist) { foreach(y, rel->pathlist) {