summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-28 10:21:51 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-28 10:21:51 -0700
commit489d3935b90bc6f1a0b866f321c4d1fc9f480d8b (patch)
tree8ab28fbadde2a9d1652f5f8714066f73799928ea
parent078fe1a5228485101a19caba39dab70ea12179ae (diff)
downloadquagga-489d3935b90bc6f1a0b866f321c4d1fc9f480d8b.tar.bz2
quagga-489d3935b90bc6f1a0b866f321c4d1fc9f480d8b.tar.xz
fix compiler warnings
Fix easy compiler warnings about unused code by marking them with #if 0 Add one missing printf argument.
-rw-r--r--bgpd/bgp_clist.c2
-rw-r--r--bgpd/bgp_damp.c4
-rw-r--r--bgpd/bgp_packet.c2
-rw-r--r--bgpd/bgp_route.c2
-rw-r--r--bgpd/bgp_zebra.c2
5 files changed, 7 insertions, 5 deletions
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c
index f75fc55b..a6ca1a46 100644
--- a/bgpd/bgp_clist.c
+++ b/bgpd/bgp_clist.c
@@ -836,6 +836,7 @@ community_list_init (void)
return ch;
}
+#if 0
/* Terminate community-list. */
static void
community_list_terminate (struct community_list_handler *ch)
@@ -857,3 +858,4 @@ community_list_terminate (struct community_list_handler *ch)
XFREE (MTYPE_COMMUNITY_LIST_HANDLER, ch);
}
+#endif
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c
index 5a7c9aaa..a0a8557d 100644
--- a/bgpd/bgp_damp.c
+++ b/bgpd/bgp_damp.c
@@ -520,8 +520,6 @@ bgp_damp_disable (struct bgp *bgp, afi_t afi, safi_t safi)
int
bgp_config_write_damp (struct vty *vty)
{
- if (&bgp_damp_cfg)
- {
if (bgp_damp_cfg.half_life == DEFAULT_HALF_LIFE*60
&& bgp_damp_cfg.reuse_limit == DEFAULT_REUSE
&& bgp_damp_cfg.suppress_value == DEFAULT_SUPPRESS
@@ -542,8 +540,6 @@ bgp_config_write_damp (struct vty *vty)
bgp_damp_cfg.max_suppress_time/60,
VTY_NEWLINE);
return 1;
- }
- return 0;
}
#define BGP_UPTIME_LEN 25
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 114cfb4f..f92a88ad 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -1237,7 +1237,7 @@ bgp_open_receive (struct peer *peer, bgp_size_t size)
zlog_debug ("%s [AS4] OPEN remote_as is AS_TRANS, but no AS4."
" Odd, but proceeding.", peer->host);
else if (as4 < BGP_AS_MAX && BGP_DEBUG (as4, AS4))
- zlog_debug ("%s [AS4] OPEN remote_as is AS_TRANS, but AS4 fits "
+ zlog_debug ("%s [AS4] OPEN remote_as is AS_TRANS, but AS4 %u fits "
"in 2-bytes, very odd peer.", peer->host, as4);
if (as4)
remote_as = as4;
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 4fbc4bab..f8eb7f7f 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -10959,6 +10959,7 @@ bgp_distance_unset (struct vty *vty, const char *distance_str,
return CMD_SUCCESS;
}
+#if 0
static void
bgp_distance_reset ()
{
@@ -10975,6 +10976,7 @@ bgp_distance_reset ()
bgp_unlock_node (rn);
}
}
+#endif
/* Apply BGP information to distance method. */
u_char
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 0b6ab45a..ec1143af 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -639,6 +639,7 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote,
return ret;
}
+#if 0
#ifdef HAVE_IPV6
static unsigned int
bgp_ifindex_by_nexthop (struct in6_addr *addr)
@@ -671,6 +672,7 @@ bgp_ifindex_by_nexthop (struct in6_addr *addr)
return 0;
}
#endif /* HAVE_IPV6 */
+#endif
void
bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp)