summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ospf6d/ospf6_zebra.c5
-rw-r--r--ospfd/ospf_abr.c4
-rw-r--r--ospfd/ospf_api.c2
-rw-r--r--ospfd/ospf_ase.c2
-rw-r--r--ospfd/ospf_lsa.c4
-rw-r--r--ospfd/ospf_network.c10
-rw-r--r--ospfd/ospf_route.c2
-rw-r--r--ospfd/ospf_snmp.c2
-rw-r--r--ospfd/ospf_spf.c2
-rw-r--r--ospfd/ospf_vty.c2
-rw-r--r--ospfd/ospf_zebra.c8
-rw-r--r--ospfd/ospfd.c2
12 files changed, 32 insertions, 13 deletions
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index c974005f..4440a67f 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -134,8 +134,9 @@ ospf6_zebra_if_state_update (int command, struct zclient *zclient,
ifp = zebra_interface_state_read (zclient->ibuf);
if (IS_OSPF6_DEBUG_ZEBRA (RECV))
zlog_debug ("Zebra Interface state change: "
- "%s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu6);
+ "%s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long)ifp->flags,
+ ifp->metric, ifp->mtu6);
ospf6_interface_state_update (ifp);
return 0;
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 88636f1a..d60ad120 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -614,6 +614,7 @@ set_metric (struct ospf_lsa *lsa, u_int32_t metric)
memcpy(header->metric, mp, 3);
}
+#if 0
static int
ospf_abr_check_nssa_range (struct prefix_ipv4 *p, u_int32_t cost,
struct ospf_area *area)
@@ -622,6 +623,7 @@ ospf_abr_check_nssa_range (struct prefix_ipv4 *p, u_int32_t cost,
for lsa installation and flooding */
return 0;
}
+#endif
/* ospf_abr_translate_nssa */
static int
@@ -1580,6 +1582,7 @@ ospf_abr_send_nssa_aggregates (struct ospf *ospf) /* temporarily turned off */
zlog_debug ("ospf_abr_send_nssa_aggregates(): Stop");
}
+#if 0
static void
ospf_abr_announce_nssa_defaults (struct ospf *ospf) /* By ABR-Translator */
{
@@ -1615,6 +1618,7 @@ ospf_abr_announce_nssa_defaults (struct ospf *ospf) /* By ABR-Translator */
}
}
}
+#endif
static void
ospf_abr_announce_stub_defaults (struct ospf *ospf)
diff --git a/ospfd/ospf_api.c b/ospfd/ospf_api.c
index 9c9997ba..179c97a7 100644
--- a/ospfd/ospf_api.c
+++ b/ospfd/ospf_api.c
@@ -220,7 +220,7 @@ msg_print (struct msg *msg)
#else /* ORIGINAL_CODING */
/* API message common header part. */
zlog_debug
- ("API-msg [%s]: type(%d),len(%d),seq(%lu),data(%p),size(%lu)",
+ ("API-msg [%s]: type(%d),len(%d),seq(%lu),data(%p),size(%z)",
ospf_api_typename (msg->hdr.msgtype), msg->hdr.msgtype,
ntohs (msg->hdr.msglen), (unsigned long) ntohl (msg->hdr.msgseq),
STREAM_DATA (msg->s), STREAM_SIZE (msg->s));
diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c
index a4812345..47f8851f 100644
--- a/ospfd/ospf_ase.c
+++ b/ospfd/ospf_ase.c
@@ -156,6 +156,7 @@ ospf_ase_forward_address_check (struct ospf *ospf, struct in_addr fwd_addr)
return 1;
}
+#if 0
/* Calculate ASBR route. */
static struct ospf_route *
ospf_ase_calculate_asbr_route (struct ospf *ospf,
@@ -236,6 +237,7 @@ ospf_ase_calculate_asbr_route (struct ospf *ospf,
return asbr_route;
}
+#endif
static struct ospf_route *
ospf_ase_calculate_new_route (struct ospf_lsa *lsa,
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 243928f4..0d205ee3 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -526,7 +526,7 @@ link_info_set (struct stream *s, struct in_addr id,
if (ret == OSPF_MAX_LSA_SIZE)
{
- zlog_warn ("%s: Out of space in LSA stream, left %ld, size %ld",
+ zlog_warn ("%s: Out of space in LSA stream, left %ld, size %z",
__func__, STREAM_REMAIN (s), STREAM_SIZE (s));
return 0;
}
@@ -1895,6 +1895,7 @@ ospf_lsa_translated_nssa_new (struct ospf *ospf,
return new;
}
+#if 0
/* compare type-5 to type-7
* -1: err, 0: same, 1: different
*/
@@ -1931,6 +1932,7 @@ ospf_lsa_translated_nssa_compare (struct ospf_lsa *t7, struct ospf_lsa *t5)
return LSA_REFRESH_IF_CHANGED;
}
+#endif
/* Originate Translated Type-5 for supplied Type-7 NSSA LSA */
struct ospf_lsa *
diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c
index d5bf7493..1a91001f 100644
--- a/ospfd/ospf_network.c
+++ b/ospfd/ospf_network.c
@@ -165,11 +165,7 @@ int
ospf_sock_init (void)
{
int ospf_sock;
- /*
- * XXX warning: unused variable `tos'
- * tos should be ifdefed similarly to usage
- */
- int ret, tos, hincl = 1;
+ int ret, hincl = 1;
if ( ospfd_privs.change (ZPRIVS_RAISE) )
zlog_err ("ospf_sock_init: could not raise privs, %s",
@@ -201,8 +197,9 @@ ospf_sock_init (void)
#elif defined (IPTOS_PREC_INTERNETCONTROL)
#warning "IP_HDRINCL not available on this system"
#warning "using IPTOS_PREC_INTERNETCONTROL"
+ {
/* Set precedence field. */
- tos = IPTOS_PREC_INTERNETCONTROL;
+ int tos = IPTOS_PREC_INTERNETCONTROL;
ret = setsockopt (ospf_sock, IPPROTO_IP, IP_TOS,
(char *) &tos, sizeof (int));
if (ret < 0)
@@ -216,6 +213,7 @@ ospf_sock_init (void)
close (ospf_sock); /* Prevent sd leak. */
return ret;
}
+ }
#else /* !IPTOS_PREC_INTERNETCONTROL */
#warning "IP_HDRINCL not available, nor is IPTOS_PREC_INTERNETCONTROL"
zlog_warn ("IP_HDRINCL option not available");
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index 3a1fa999..fc372329 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -270,6 +270,7 @@ ospf_route_install (struct ospf *ospf, struct route_table *rt)
}
}
+#if 0
static void
ospf_intra_route_add (struct route_table *rt, struct vertex *v,
struct ospf_area *area)
@@ -324,6 +325,7 @@ ospf_intra_route_add (struct route_table *rt, struct vertex *v,
rn->info = or;
}
+#endif
/* RFC2328 16.1. (4). For "router". */
void
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index 6e972605..e76b39b0 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -1561,6 +1561,7 @@ ospf_snmp_if_lookup_next (struct in_addr *ifaddr, unsigned int *ifindex,
{
/* Usual interface */
if (ifaddr->s_addr)
+ {
/* The interface must have valid AF_INET connected address */
/* it must have lager IPv4 address value than the lookup entry */
if ((ospf_snmp_is_if_have_addr(osif->ifp)) &&
@@ -1574,6 +1575,7 @@ ospf_snmp_if_lookup_next (struct in_addr *ifaddr, unsigned int *ifindex,
if (oi)
return oi;
}
+ }
/* Unnumbered interface */
else
/* The interface must NOT have valid AF_INET connected address */
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 23d45dd6..34d25ed5 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1024,6 +1024,7 @@ ospf_rtrs_free (struct route_table *rtrs)
route_table_finish (rtrs);
}
+#if 0
static void
ospf_rtrs_print (struct route_table *rtrs)
{
@@ -1082,6 +1083,7 @@ ospf_rtrs_print (struct route_table *rtrs)
zlog_debug ("ospf_rtrs_print() end");
}
+#endif
/* Calculating the shortest-path tree for an area. */
static void
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 5f9fa2cb..c96b88ab 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -3766,6 +3766,7 @@ show_as_external_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
return 0;
}
+#if 0
/* N.B. This function currently seems to be unused. */
static int
show_as_external_lsa_stdvty (struct ospf_lsa *lsa)
@@ -3790,6 +3791,7 @@ show_as_external_lsa_stdvty (struct ospf_lsa *lsa)
return 0;
}
+#endif
/* Show AS-NSSA-LSA detail information. */
static int
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index f302d28d..5405a782 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -92,8 +92,9 @@ ospf_interface_add (int command, struct zclient *zclient, zebra_size_t length)
ifp = zebra_interface_add_read (zclient->ibuf);
if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
- zlog_debug ("Zebra: interface add %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ zlog_debug ("Zebra: interface add %s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long)ifp->flags,
+ ifp->metric, ifp->mtu);
assert (ifp->info);
@@ -136,7 +137,8 @@ ospf_interface_delete (int command, struct zclient *zclient,
if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
zlog_debug
("Zebra: interface delete %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ ifp->name, ifp->ifindex, (unsigned long long)ifp->flags,
+ ifp->metric, ifp->mtu);
#ifdef HAVE_SNMP
ospf_snmp_if_delete (ifp);
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index a4c4fac3..448f218e 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -1246,6 +1246,7 @@ ospf_area_nssa_translator_role_set (struct ospf *ospf, struct in_addr area_id,
return 1;
}
+#if 0
/* XXX: unused? Leave for symmetry? */
static int
ospf_area_nssa_translator_role_unset (struct ospf *ospf,
@@ -1263,6 +1264,7 @@ ospf_area_nssa_translator_role_unset (struct ospf *ospf,
return 1;
}
+#endif
int
ospf_area_export_list_set (struct ospf *ospf,