From fa334a90576b2067aead7f49a404230b63b202e8 Mon Sep 17 00:00:00 2001 From: Ben Greear Date: Mon, 25 Jul 2011 11:15:04 -0700 Subject: [PATCH] pim: Compile fixes for gcc 4.6 Original patch by: Jose Manuel dos Santos Calhariz Signed-off-by: Ben Greear --- xorp/pim/pim_mrt_mfc.cc | 9 ++++--- xorp/pim/pim_proto_assert.cc | 2 ++ xorp/pim/pim_proto_join_prune.cc | 22 +---------------- xorp/pim/pim_proto_join_prune_message.cc | 31 +----------------------- xorp/pim/pim_proto_register_stop.cc | 24 +----------------- 5 files changed, 11 insertions(+), 77 deletions(-) diff --git a/xorp/pim/pim_mrt_mfc.cc b/xorp/pim/pim_mrt_mfc.cc index 6ba1ac893..0f2b74397 100644 --- a/xorp/pim/pim_mrt_mfc.cc +++ b/xorp/pim/pim_mrt_mfc.cc @@ -470,7 +470,6 @@ PimMrt::signal_dataflow_recv(const IPvX& source_addr, bool is_leq_upcall) { PimMre *pim_mre; - PimMre *pim_mre_wc; PimMre *pim_mre_sg; PimMfc *pim_mfc; uint32_t lookup_flags @@ -530,17 +529,21 @@ PimMrt::signal_dataflow_recv(const IPvX& source_addr, break; } while (false); + // TODO: pim_mre_wc is un-used...need to see if it should be used, + // and if not, just delete this code. --Ben +#if 0 // // Get the (*,G) entry // - pim_mre_wc = NULL; + PimMre *pim_mre_wc = NULL; if (pim_mre != NULL) { if (pim_mre->is_wc()) pim_mre_wc = pim_mre; else pim_mre_wc = pim_mre->wc_entry(); } - +#endif + if (is_geq_upcall) goto is_geq_upcall_label; else diff --git a/xorp/pim/pim_proto_assert.cc b/xorp/pim/pim_proto_assert.cc index 2a6df3797..83d69e0b2 100644 --- a/xorp/pim/pim_proto_assert.cc +++ b/xorp/pim/pim_proto_assert.cc @@ -84,6 +84,8 @@ PimVif::pim_assert_recv(PimNbr *pim_nbr, AssertMetric assert_metric(src); bool rpt_bit; + UNUSED(group_addr_reserved_flags); + // // Parse the message // diff --git a/xorp/pim/pim_proto_join_prune.cc b/xorp/pim/pim_proto_join_prune.cc index aaf260fef..f522a1371 100644 --- a/xorp/pim/pim_proto_join_prune.cc +++ b/xorp/pim/pim_proto_join_prune.cc @@ -35,27 +35,6 @@ #include "pim_vif.hh" -// -// Exported variables -// - -// -// Local constants definitions -// - -// -// Local structures/classes, typedefs and macros -// - -// -// Local variables -// - -// -// Local functions prototypes -// - - /** * PimVif::pim_join_prune_recv: * @pim_nbr: The PIM neighbor message originator (or NULL if not a neighbor). @@ -95,6 +74,7 @@ PimVif::pim_join_prune_recv(PimNbr *pim_nbr, const IPvX& src, UNUSED(src); UNUSED(dst); UNUSED(message_type); + UNUSED(group_addr_reserved_flags); // // Parse the message diff --git a/xorp/pim/pim_proto_join_prune_message.cc b/xorp/pim/pim_proto_join_prune_message.cc index cd7fab417..7bdb204f0 100644 --- a/xorp/pim/pim_proto_join_prune_message.cc +++ b/xorp/pim/pim_proto_join_prune_message.cc @@ -40,27 +40,6 @@ #include "pim_vif.hh" -// -// Exported variables -// - -// -// Local constants definitions -// - -// -// Local structures/classes, typedefs and macros -// - -// -// Local variables -// - -// -// Local functions prototypes -// - - PimJpHeader::PimJpHeader(PimNode* pim_node) : _pim_node(pim_node), _family(pim_node->family()), @@ -341,7 +320,7 @@ PimJpHeader::mrt_commit(PimVif *pim_vif, const IPvX& target_nbr_addr) uint32_t lookup_flags = 0, create_flags = 0; uint32_t vif_index; uint16_t holdtime; - uint8_t source_mask_len, group_mask_len; + uint8_t group_mask_len; IPvX source_addr(family()), group_addr(family()); list::iterator iter; PimMre *pim_mre; @@ -399,7 +378,6 @@ PimJpHeader::mrt_commit(PimVif *pim_vif, const IPvX& target_nbr_addr) iter2 != jp_group->rp()->j_list().end(); ++iter2) { source_addr = *iter2; - source_mask_len = IPvX::addr_bitlen(family()); if (i_am_target_router) pim_mrt().add_task_receive_join_rp(vif_index, source_addr); @@ -428,7 +406,6 @@ PimJpHeader::mrt_commit(PimVif *pim_vif, const IPvX& target_nbr_addr) iter2 != jp_group->rp()->p_list().end(); ++iter2) { source_addr = *iter2; - source_mask_len = IPvX::addr_bitlen(family()); if (i_am_target_router) pim_mrt().add_task_receive_prune_rp(vif_index, source_addr); @@ -456,7 +433,6 @@ PimJpHeader::mrt_commit(PimVif *pim_vif, const IPvX& target_nbr_addr) iter2 != jp_group->wc()->j_list().end(); ++iter2) { source_addr = *iter2; - source_mask_len = IPvX::addr_bitlen(family()); if (i_am_target_router) pim_mrt().add_task_receive_join_wc(vif_index, group_addr); @@ -485,7 +461,6 @@ PimJpHeader::mrt_commit(PimVif *pim_vif, const IPvX& target_nbr_addr) iter2 != jp_group->wc()->p_list().end(); ++iter2) { source_addr = *iter2; - source_mask_len = IPvX::addr_bitlen(family()); if (i_am_target_router) { pim_mrt().add_task_receive_prune_wc(vif_index, group_addr); @@ -516,7 +491,6 @@ PimJpHeader::mrt_commit(PimVif *pim_vif, const IPvX& target_nbr_addr) iter2 != jp_group->sg_rpt()->j_list().end(); ++iter2) { source_addr = *iter2; - source_mask_len = IPvX::addr_bitlen(family()); if (i_am_target_router) { pim_mrt().add_task_receive_join_sg_rpt(vif_index, source_addr, @@ -545,7 +519,6 @@ PimJpHeader::mrt_commit(PimVif *pim_vif, const IPvX& target_nbr_addr) iter2 != jp_group->sg_rpt()->p_list().end(); ++iter2) { source_addr = *iter2; - source_mask_len = IPvX::addr_bitlen(family()); if (i_am_target_router) { pim_mrt().add_task_receive_prune_sg_rpt(vif_index, source_addr, @@ -608,7 +581,6 @@ PimJpHeader::mrt_commit(PimVif *pim_vif, const IPvX& target_nbr_addr) iter2 != jp_group->sg()->j_list().end(); ++iter2) { source_addr = *iter2; - source_mask_len = IPvX::addr_bitlen(family()); if (i_am_target_router) { pim_mrt().add_task_receive_join_sg(vif_index, source_addr, @@ -639,7 +611,6 @@ PimJpHeader::mrt_commit(PimVif *pim_vif, const IPvX& target_nbr_addr) iter2 != jp_group->sg()->p_list().end(); ++iter2) { source_addr = *iter2; - source_mask_len = IPvX::addr_bitlen(family()); if (i_am_target_router) { pim_mrt().add_task_receive_prune_sg(vif_index, source_addr, diff --git a/xorp/pim/pim_proto_register_stop.cc b/xorp/pim/pim_proto_register_stop.cc index c6dee7f13..8f7de18c1 100644 --- a/xorp/pim/pim_proto_register_stop.cc +++ b/xorp/pim/pim_proto_register_stop.cc @@ -18,8 +18,6 @@ // http://xorp.net - - // // PIM PIM_REGISTER_STOP messages processing. // @@ -36,27 +34,6 @@ #include "pim_vif.hh" -// -// Exported variables -// - -// -// Local constants definitions -// - -// -// Local structures/classes, typedefs and macros -// - -// -// Local variables -// - -// -// Local functions prototypes -// - - /** * PimVif::pim_register_stop_recv: * @pim_nbr: The PIM neighbor message originator (or NULL if not a neighbor). @@ -79,6 +56,7 @@ PimVif::pim_register_stop_recv(PimNbr *pim_nbr, uint8_t group_mask_len; IPvX source_addr(family()), group_addr(family()); UNUSED(dst); + UNUSED(group_addr_reserved_flags); // // Parse the message