bgpd: compile warnings cleanup

* bgpd/bgp_fsm.c
  * bgp_clearing_completed(): only used in one file, can be static
* bgpd/bgp_packet.c
  * afi2str(): sayonara
  * safi2str(): sayonara
* bgpd/bgp_route.c
  * bgp_distance_reset(): sayonara
* bgpd/bgp_zebra.c
  * bgp_ifindex_by_nexthop(): sayonara
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 6121e74..c815f9a 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -427,7 +427,7 @@
 }
 
 /* Flush the event queue and ensure the peer is shut down */
-int
+static int
 bgp_clearing_completed (struct peer *peer)
 {
   int rc = bgp_stop(peer);
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 1c9a3c9..6153419 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -920,30 +920,6 @@
   bgp_notify_send_with_data (peer, code, sub_code, NULL, 0);
 }
 
-static const char *
-afi2str (afi_t afi)
-{
-  if (afi == AFI_IP)
-    return "AFI_IP";
-  else if (afi == AFI_IP6)
-    return "AFI_IP6";
-  else
-    return "Unknown AFI";
-}
-
-static const char *
-safi2str (safi_t safi)
-{
-  if (safi == SAFI_UNICAST)
-    return "SAFI_UNICAST";
-  else if (safi == SAFI_MULTICAST)
-    return "SAFI_MULTICAST";
-  else if (safi == SAFI_MPLS_VPN || safi == BGP_SAFI_VPNV4)
-    return "SAFI_MPLS_VPN";
-  else
-    return "Unknown SAFI";
-}
-
 /* Send route refresh message to the peer. */
 void
 bgp_route_refresh_send (struct peer *peer, afi_t afi, safi_t safi,
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 2088039..f3144fe 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -11031,23 +11031,6 @@
   return CMD_SUCCESS;
 }
 
-static void
-bgp_distance_reset (void)
-{
-  struct bgp_node *rn;
-  struct bgp_distance *bdistance;
-
-  for (rn = bgp_table_top (bgp_distance_table); rn; rn = bgp_route_next (rn))
-    if ((bdistance = rn->info) != NULL)
-      {
-	if (bdistance->access_list)
-	  free (bdistance->access_list);
-	bgp_distance_free (bdistance);
-	rn->info = NULL;
-	bgp_unlock_node (rn);
-      }
-}
-
 /* Apply BGP information to distance method. */
 u_char
 bgp_distance_apply (struct prefix *p, struct bgp_info *rinfo, struct bgp *bgp)
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 49380cc..f3baeee 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -639,39 +639,6 @@
   return ret;
 }
 
-#ifdef HAVE_IPV6
-static unsigned int
-bgp_ifindex_by_nexthop (struct in6_addr *addr)
-{
-  struct listnode *ifnode;
-  struct listnode *cnode;
-  struct interface *ifp;
-  struct connected *connected;
-  struct prefix_ipv6 p;
-  
-  p.family = AF_INET6;
-  p.prefix = *addr;
-  p.prefixlen = IPV6_MAX_BITLEN;
-
-  for (ALL_LIST_ELEMENTS_RO (iflist, ifnode, ifp))
-    {
-      for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, connected))
-	{
-	  struct prefix *cp; 
-
-	  cp = connected->address;
-	    
-	  if (cp->family == AF_INET6)
-	    {
-	      if (prefix_match (cp, (struct prefix *)&p))
-		return ifp->ifindex;
-	    }
-	}
-    }
-  return 0;
-}
-#endif /* HAVE_IPV6 */
-
 void
 bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp)
 {