pgpool2.git / summary / log / commit / refs

commit    fcffe82b4750d48905ac22b8cbbc426096036af8
Author:   Yoshiharu Mori <y-mori at sraoss.co.jp>
Date:     Wed Oct 17 03:00:07 2007 +0000

    Fix: compiler's warning


pool.h | 1 + pool_process_query.c | 9 ++------- pool_rewrite_outfuncs.c | 17 +++++++++-------- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/pool.h b/pool.h index 768870709..bf99220b9 100644 --- a/pool.h +++ b/pool.h @@ -524,6 +524,7 @@ extern POOL_CONNECTION_POOL_SLOT *make_persistent_db_connection( /* define pool_system.c */ extern POOL_CONNECTION_POOL_SLOT *pool_system_db_connection(void); extern DistDefInfo *pool_get_dist_def_info (char * dbname, char * schema_name, char * table_name); +extern RepliDefInfo *pool_get_repli_def_info (char * dbname, char * schema_name, char * table_name); extern int pool_get_id (DistDefInfo *info, const char * value); extern int system_db_connect (void); extern int pool_memset_system_db_info (SystemDBInfo *info); diff --git a/pool_process_query.c b/pool_process_query.c index dcab2bd58..225b55fa0 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -571,12 +571,6 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend, /* using only in pool_parallel_exec */ #define BITS (8 * sizeof(long int)) -/* using only in pool_parallel_exec */ -typedef struct -{ - long int fds_bit[1024 / BITS]; -} get_fd; - /* using only in pool_parallel_exec */ static void set_fd(unsigned long fd ,fd_set *setp) { @@ -596,7 +590,8 @@ static int isset_fd(unsigned long fd, fd_set *setp) /* using only in pool_parallel_exec */ static void zero_fd(fd_set *setp) { - unsigned long *tmp = setp->fds_bits; + unsigned long *tmp; + tmp = (unsigned long *) setp->fds_bits; int i = 1024 / BITS; while(i) { diff --git a/pool_rewrite_outfuncs.c b/pool_rewrite_outfuncs.c index c1f024ed7..64da1f94b 100644 --- a/pool_rewrite_outfuncs.c +++ b/pool_rewrite_outfuncs.c @@ -547,8 +547,8 @@ static void _rewriteList(Node *BaseSelect, RewriteQuery *message, ConInfoTodblin { ListCell *lc; char first = 0; - char state; - int loop = 0; + char state = (char)0; + int loop = 0; bool from; int current_select = message->current_select; int next = -1; @@ -1049,7 +1049,7 @@ static void append_join_using(AnalyzeSelect *analyze,char **col_list,char **type { char *colname = join->col_list[i]; int match = 0; - int array; + int array = 0; for(j = 0; j < num; j++) { if(!strcmp(colname, using[j])) @@ -1306,6 +1306,7 @@ static void build_join_table(RewriteQuery *message,char *alias, int type) range = analyze->range[range_num - 1]; state = range->state; lstate = join->state; + right_num = 0; distinfo = range->distinfo; repliinfo = range->repliinfo; @@ -1345,7 +1346,7 @@ static void build_join_table(RewriteQuery *message,char *alias, int type) else append_join_simple(join,repliinfo->col_list,repliinfo->type_list,repliinfo->col_num,table_name); } - else if (selectinfo && !repliinfo && !distinfo) + else if (selectinfo && !repliinfo && !distinfo) { pool_debug("inside build_join_info dist state=%c %s",range->state,table_name); right_num = selectinfo->col_num; @@ -1594,8 +1595,8 @@ build_range_info(RewriteQuery *message,DistDefInfo *info,RepliDefInfo *info2,Sel static void _rewriteRangeVar(Node *BaseSelect, RewriteQuery *message, ConInfoTodblink *dblink, String *str, RangeVar *node) { - DistDefInfo *info; - RepliDefInfo *info2; + DistDefInfo *info = NULL; + RepliDefInfo *info2 = NULL; if(message->r_code == SELECT_ANALYZE) { @@ -1695,7 +1696,7 @@ _rewriteRangeVar(Node *BaseSelect, RewriteQuery *message, ConInfoTodblink *dblin if(select->whereClause && !(message->r_code == SELECT_PGCATALOG)) { - char * temp; + char * temp = NULL; int message_code = message->r_code; delay_string_append_char(message, str, " WHERE "); @@ -3734,7 +3735,7 @@ ChangeStatebyColumnRef(RewriteQuery *message,ColumnRef *col) List *list; char first = 0; char *table_name = NULL; - char *column; + char *column = NULL; int num,no; list = col->fields; [parent: a0a936ec11ae]