From e5f745ca93e965dbc31823fd092e62667c8404c7 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 May 2015 18:29:14 -0700 Subject: [PATCH] ripd: ripd-warnings.patch Remove compile warnings for the ripd directory Signed-off-by: Donald Sharp Reviewed-by: --- ripd/rip_interface.c | 2 +- ripd/ripd.c | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 22cef4540d..9a5bffe92b 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -832,7 +832,7 @@ rip_enable_network_add (struct prefix *p) return -1; } else - node->info = (char *) "enabled"; + node->info = (void *)1; /* XXX: One should find a better solution than a generic one */ rip_enable_apply_all(); diff --git a/ripd/ripd.c b/ripd/ripd.c index 8a7fef875b..8c0470e64e 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -1684,16 +1684,6 @@ rip_request_process (struct rip_packet *packet, int size, ntohs (rte->family) == 0 && ntohl (rte->metric) == RIP_METRIC_INFINITY) { - struct prefix_ipv4 saddr; - - /* saddr will be used for determining which routes to split-horizon. - Since the source address we'll pick will be on the same subnet as the - destination, for the purpose of split-horizoning, we'll - pretend that "from" is our source address. */ - saddr.family = AF_INET; - saddr.prefixlen = IPV4_MAX_BITLEN; - saddr.prefix = from->sin_addr; - /* All route with split horizon */ rip_output_process (ifc, from, rip_all_route, packet->version); } @@ -2934,7 +2924,7 @@ DEFUN (rip_route, return CMD_WARNING; } - node->info = (char *)"static"; + node->info = (void *)1; rip_redistribute_add (ZEBRA_ROUTE_RIP, RIP_ROUTE_STATIC, &p, 0, NULL, 0, 0); @@ -3181,7 +3171,6 @@ rip_distance_unset (struct vty *vty, const char *distance_str, { int ret; struct prefix_ipv4 p; - u_char distance; struct route_node *rn; struct rip_distance *rdistance; @@ -3192,8 +3181,6 @@ rip_distance_unset (struct vty *vty, const char *distance_str, return CMD_WARNING; } - distance = atoi (distance_str); - rn = route_node_lookup (rip_distance_table, (struct prefix *)&p); if (! rn) { -- 2.39.5