Changeset: ab90169e739a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ab90169e739a
Modified Files:
        pathfinder/compiler/algebra-m5sql/lalg2msa.c
        pathfinder/compiler/algebra-m5sql/msa.c
Branch: default
Log Message:

Initialize variables (to avoid problems and keep compilers happy).


diffs (81 lines):

diff -r 2bb77c972f4b -r ab90169e739a 
pathfinder/compiler/algebra-m5sql/lalg2msa.c
--- a/pathfinder/compiler/algebra-m5sql/lalg2msa.c      Wed May 19 17:37:19 
2010 +0200
+++ b/pathfinder/compiler/algebra-m5sql/lalg2msa.c      Thu May 20 15:25:46 
2010 +0200
@@ -140,9 +140,9 @@
     unsigned int i;
     /* declarations need for the translation: msa annotation and its contents 
*/
     PFmsa_ann_t *msa_ann;
-    PFmsa_op_t *op;
-    PFmsa_exprlist_t *prj_list;
-    PFmsa_exprlist_t *sel_list;
+    PFmsa_op_t *op = NULL;
+    PFmsa_exprlist_t *prj_list = NULL;
+    PFmsa_exprlist_t *sel_list = NULL;
     
     /* traverse child operators recursively */
     for (i = 0; i < PFLA_OP_MAXCHILD && n->child[i]; i++) {
@@ -360,7 +360,7 @@
              are preserved. */
             
             PFmsa_exprlist_t        *exprlist;
-            PFmsa_comp_kind_t       comp_kind;
+            PFmsa_comp_kind_t       comp_kind = msa_comp_equal;
             PFalg_sel_t             curr_pred;
             PFmsa_expr_t            *left_col;
             PFmsa_expr_t            *right_col;
@@ -636,7 +636,7 @@
             /* Append comparison expression representing gt/eq 
              to projection list. Operator and selection list
              stay unchanged. */
-            PFmsa_comp_kind_t           comp_kind;
+            PFmsa_comp_kind_t           comp_kind = msa_comp_equal;
             PFmsa_expr_t                *col1_expr;
             PFmsa_expr_t                *col2_expr;
             
@@ -698,7 +698,7 @@
                              n->sem.binary.col2);
             eladd(exprlist) = expr;
             
-            PFmsa_expr_func_name func_name;
+            PFmsa_expr_func_name func_name = msa_func_or;
             switch (n->kind) {
                 case la_bool_or:
                     func_name = msa_func_or;
@@ -887,7 +887,7 @@
             PFmsa_expr_t            *expr_cpy;
             PFalg_col_t             curr_col;
             bool                    curr_sortorder;
-            PFmsa_num_gen_kind_t    kind;
+            PFmsa_num_gen_kind_t    kind = msa_num_gen_rowrank;
             
             op = OP (L(n));
             prj_list = elcopy(PRJ_LIST (L(n)));
diff -r 2bb77c972f4b -r ab90169e739a pathfinder/compiler/algebra-m5sql/msa.c
--- a/pathfinder/compiler/algebra-m5sql/msa.c   Wed May 19 17:37:19 2010 +0200
+++ b/pathfinder/compiler/algebra-m5sql/msa.c   Thu May 20 15:25:46 2010 +0200
@@ -263,9 +263,9 @@
 PFmsa_expr_func (PFmsa_expr_func_name name, PFmsa_exprlist_t *child_list,
                  PFalg_col_t res_col)
 {
-    PFmsa_expr_t *ret;
-    PFmsa_expr_t *n1;
-    PFmsa_expr_t *n2;
+    PFmsa_expr_t *ret = NULL;
+    PFmsa_expr_t *n1 = NULL;
+    PFmsa_expr_t *n2 = NULL;
     
     /* Common cases */
     if (elsize(child_list) == 0) 
@@ -304,9 +304,9 @@
 PFmsa_expr_t * PFmsa_expr_num_gen (PFmsa_num_gen_kind_t kind, PFmsa_exprlist_t 
*child_list,
                                    PFalg_col_t res_col)
 {
-    PFmsa_expr_t *ret;
-    PFmsa_expr_t *n1;
-    PFmsa_expr_t *n2;
+    PFmsa_expr_t *ret = NULL;
+    PFmsa_expr_t *n1 = NULL;
+    PFmsa_expr_t *n2 = NULL;
     
     /* Common cases */
     if (elsize(child_list) == 0) 
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to