Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unused variables.
[simgrid.git] / src / surf / surf_routing_dijkstra.c
index ab9e58f..4a049a4 100644 (file)
@@ -330,8 +330,7 @@ static route_extended_t dijkstra_get_route(routing_component_t rc,
   }
 
   /* compose route path with links */
-  char *gw_src = NULL, *gw_dst =
-      NULL, *prev_gw_src, *prev_gw_dst, *first_gw = NULL;
+  char *gw_src = NULL, *gw_dst = NULL, *prev_gw_src, *first_gw = NULL;
 
   for (v = dst_node_id; v != src_node_id; v = pred_arr[v]) {
     xbt_node_t node_pred_v =
@@ -344,7 +343,6 @@ static route_extended_t dijkstra_get_route(routing_component_t rc,
                 *dst_id);
 
     prev_gw_src = gw_src;
-    prev_gw_dst = gw_dst;
 
     e_route = (route_extended_t) xbt_graph_edge_get_data(edge);
     gw_src = e_route->src_gateway;
@@ -500,6 +498,9 @@ void model_dijkstra_both_set_route (routing_component_t rc, const char *src,
        src_id = xbt_dict_get_or_null(rc->to_index, src);
        dst_id = xbt_dict_get_or_null(rc->to_index, dst);
 
+       xbt_assert(src_id, "Network elements %s not found", src);
+       xbt_assert(dst_id, "Network elements %s not found", dst);
+
     /* Create the topology graph */
        if(!routing->route_graph)
        routing->route_graph = xbt_graph_new_graph(1, NULL);