From: Sebastian Buchwald Date: Fri, 6 Aug 2010 12:59:04 +0000 (+0000) Subject: Fixed some warnings. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=f71a8c8d50158b15b1932a99270b0470670dd2e6;p=libfirm Fixed some warnings. [r27880] --- diff --git a/heuristical_co_ld.c b/heuristical_co_ld.c index 06604bba4..18ebe13d5 100644 --- a/heuristical_co_ld.c +++ b/heuristical_co_ld.c @@ -39,6 +39,8 @@ static void back_propagate_RI(pbqp *pbqp, pbqp_node *node) assert(pbqp); assert(node); + (void) pbqp; + edge = node->edges[0]; mat = edge->costs; is_src = edge->src == node; diff --git a/matrix.c b/matrix.c index e4d1a7139..cd3bfba81 100644 --- a/matrix.c +++ b/matrix.c @@ -180,8 +180,8 @@ num pbqp_matrix_get_col_min(pbqp_matrix *matrix, unsigned col_index, vector *fla unsigned pbqp_matrix_get_col_min_index(pbqp_matrix *matrix, unsigned col_index, vector *flags) { unsigned row_index; - unsigned min_index; - num min = INF_COSTS; + unsigned min_index = 0; + num min = INF_COSTS; assert(matrix); assert(flags); @@ -260,8 +260,8 @@ num pbqp_matrix_get_row_min(pbqp_matrix *matrix, unsigned row_index, vector *fla unsigned pbqp_matrix_get_row_min_index(pbqp_matrix *matrix, unsigned row_index, vector *flags) { unsigned col_index; - unsigned min_index; - num min = INF_COSTS; + unsigned min_index = 0; + num min = INF_COSTS; assert(matrix); assert(flags); diff --git a/optimal.c b/optimal.c index f68f1c05a..b5e834df8 100644 --- a/optimal.c +++ b/optimal.c @@ -664,6 +664,8 @@ void simplify_edge(pbqp *pbqp, pbqp_edge *edge) assert(pbqp); assert(edge); + (void) pbqp; + src_node = edge->src; tgt_node = edge->tgt; assert(src_node); @@ -796,6 +798,8 @@ num determine_solution(pbqp *pbqp) assert(pbqp); + (void) pbqp; + #if KAPS_DUMP file = pbqp->dump_file; @@ -858,6 +862,8 @@ static void back_propagate_RI(pbqp *pbqp, pbqp_node *node) assert(pbqp); assert(node); + (void) pbqp; + edge = node->edges[0]; mat = edge->costs; is_src = edge->src == node; diff --git a/pbqp_node.c b/pbqp_node.c index b324e49b3..cd9536b21 100644 --- a/pbqp_node.c +++ b/pbqp_node.c @@ -105,13 +105,14 @@ pbqp_node *pbqp_node_deep_copy(pbqp *pbqp, pbqp_node_bucket new_bucket, pbqp_nod unsigned edge_index; unsigned edge_length = pbqp_node_get_degree(node); pbqp_node *copy = obstack_alloc(&pbqp->obstack, sizeof(*node)); + assert(copy); copy->edges = NEW_ARR_F(pbqp_edge *, 0); for (edge_index = 0; edge_index < edge_length; ++edge_index) { - pbqp_edge *edge_copy; - pbqp_edge *edge = node->edges[edge_index]; - int is_src = edge->src == node; + pbqp_edge *edge_copy = NULL; + pbqp_edge *edge = node->edges[edge_index]; + int is_src = edge->src == node; if (is_src) { unsigned other_index = edge->tgt->bucket_index; diff --git a/vector.c b/vector.c index c643cd570..d1695d3d0 100644 --- a/vector.c +++ b/vector.c @@ -38,9 +38,11 @@ num pbqp_add(num x, num y) num res = x + y; +#if !KAPS_USE_UNSIGNED /* No positive overflow. */ assert(x < 0 || y < 0 || res >= x); assert(x < 0 || y < 0 || res >= y); +#endif /* No negative overflow. */ assert(x > 0 || y > 0 || res <= x);