Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee6d3a7

Browse files
committed
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 forthis directory for now
1 parent950c576 commitee6d3a7

File tree

6 files changed

+25
-18
lines changed

6 files changed

+25
-18
lines changed

‎src/backend/optimizer/geqo/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# Copyright (c) 1994, Regents of the University of California
77
#
8-
# $Id: Makefile,v 1.1 1997/02/1912:56:38 scrappy Exp $
8+
# $Id: Makefile,v 1.2 1997/02/1914:51:55 scrappy Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -16,12 +16,12 @@ INCLUDE_OPT = -I../.. \
1616
-I../../port/$(PORTNAME)\
1717
-I../../../include
1818

19-
CFLAGS+=$(INCLUDE_OPT)
19+
CFLAGS+=$(INCLUDE_OPT) -Wno-error
2020

21-
OBJS =geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o\
22-
geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o\
23-
geqo_selection.o\
24-
geqo_erx.o geqo_pmx.o geqo_cx.o geqo_px.o
21+
OBJS =geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o\
22+
geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o\
23+
geqo_selection.o\
24+
geqo_erx.o geqo_pmx.o geqo_cx.o geqo_px.o
2525

2626
# not ready yet: geqo_ox1.o geqo_ox2.o
2727
# deprecated: minspantree.o

‎src/backend/optimizer/geqo/geqo_eval.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geqo_eval.c,v 1.3 1997/02/19 14:29:22 scrappy Exp $
8+
* $Id: geqo_eval.c,v 1.4 1997/02/19 14:51:57 scrappy Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -40,6 +40,8 @@
4040
#include"optimizer/pathnode.h"
4141
#include"optimizer/clauses.h"
4242
#include"optimizer/cost.h"
43+
#include"optimizer/tlist.h"
44+
#include"optimizer/joininfo.h"
4345

4446
#include"optimizer/geqo_gene.h"
4547
#include"optimizer/geqo.h"

‎src/backend/optimizer/geqo/geqo_main.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: geqo_main.c,v 1.1 1997/02/1912:57:05 scrappy Exp $
9+
* $Id: geqo_main.c,v 1.2 1997/02/1914:51:59 scrappy Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -66,7 +66,6 @@
6666
Rel*
6767
geqo(Query*root)
6868
{
69-
inti,j;
7069
intgeneration;
7170
Chromosome*momma;
7271
Chromosome*daddy;
@@ -76,21 +75,26 @@ geqo(Query *root)
7675
intedge_failures=0;
7776
floatdifference;
7877

78+
#if defined(CX)|| defined(PX)|| defined(QX1)|| defined(QX2)
7979
City*city_table;/* list of cities */
80+
#endif
81+
82+
#if defined(CX)
8083
intcycle_diffs=0;
84+
#endif
8185

86+
#if defined(CX)&& defined(GEQO_DEBUG)
8287
intmutations=0;
88+
#endif
8389

8490
intnumber_of_rels;
85-
List*r=NIL;
86-
List*rel_list= (List*)root->base_relation_list_;
8791

8892
Pool*pool;
8993
intpool_size,number_generations,status_interval;
9094

9195
Gene*best_tour;
9296
Rel*best_rel;
93-
Plan*best_plan;
97+
/*Plan *best_plan; */
9498

9599

96100
/* set tour size */

‎src/backend/optimizer/geqo/geqo_misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geqo_misc.c,v 1.1 1997/02/1912:57:09 scrappy Exp $
8+
* $Id: geqo_misc.c,v 1.2 1997/02/1914:52:01 scrappy Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -151,7 +151,7 @@ geqo_print_path(Query *root, Path *path, int indent)
151151
{
152152
char*ptype=NULL;
153153
JoinPath*jp;
154-
booljoin;
154+
booljoin= false;
155155
inti;
156156

157157
for(i=0;i<indent;i++)

‎src/backend/optimizer/geqo/geqo_params.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geqo_params.c,v 1.1 1997/02/1912:57:20 scrappy Exp $
8+
* $Id: geqo_params.c,v 1.2 1997/02/1914:52:04 scrappy Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -21,6 +21,7 @@
2121
#include<stdio.h>
2222
#include<time.h>
2323
#include<math.h>
24+
#include<ctype.h>
2425

2526
#include"postgres.h"
2627
#include"miscadmin.h"
@@ -166,7 +167,7 @@ geqo_params(int string_length)
166167

167168
if (i!=EOF)
168169
{
169-
if (sscanf (buf,"%f",&SelectionBias)==1)selection_bias=1;
170+
if (sscanf (buf,"%lf",&SelectionBias)==1)selection_bias=1;
170171
}
171172

172173
}

‎src/backend/optimizer/geqo/geqo_paths.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geqo_paths.c,v 1.1 1997/02/1912:57:25 scrappy Exp $
8+
* $Id: geqo_paths.c,v 1.2 1997/02/1914:52:06 scrappy Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -99,7 +99,7 @@ void
9999
geqo_rel_paths(Rel*rel)
100100
{
101101
List*y=NIL;
102-
Path*path;
102+
Path*path= (Path*)NULL;
103103
JoinPath*cheapest= (JoinPath*)NULL;
104104

105105
foreach(y,rel->pathlist) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp