Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25306
This commit is contained in:
parent
931cc922a1
commit
558c1b5ee6
|
@ -309,6 +309,7 @@ static void
|
|||
dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem)
|
||||
{
|
||||
proto_tree *ti = NULL, *tlv_fec_tree = NULL;
|
||||
proto_item *hidden_item;
|
||||
guint16 index = 1, nil_index = 1, type, saved_type;
|
||||
int length, nil_length, pad;
|
||||
guint32 label;
|
||||
|
@ -377,8 +378,9 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
|
|||
proto_tree_add_text(tlv_fec_tree, tvb, offset + 12, 4,
|
||||
"Extended Tunnel ID: 0x%08X (%s)", tvb_get_ntohl(tvb, offset + 12),
|
||||
ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
|
||||
proto_tree_add_item_hidden(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ipv4_ext_tunnel_id,
|
||||
hidden_item = proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ipv4_ext_tunnel_id,
|
||||
tvb, offset + 12, 4, FALSE);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ipv4_ipv4_sender,
|
||||
tvb, offset + 16, 4, FALSE);
|
||||
proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ip_mbz2,
|
||||
|
@ -402,8 +404,9 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
|
|||
"Extended Tunnel ID: 0x%s (%s)",
|
||||
tvb_bytes_to_str(tvb, offset + 24, 16),
|
||||
ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 24, 16)));
|
||||
proto_tree_add_item_hidden(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ipv6_ext_tunnel_id,
|
||||
hidden_item = proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ipv6_ext_tunnel_id,
|
||||
tvb, offset + 24, 16, FALSE);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ipv6_ipv6_sender,
|
||||
tvb, offset + 40, 16, FALSE);
|
||||
proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ip_mbz2,
|
||||
|
|
|
@ -2248,7 +2248,9 @@ dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
if (tree)
|
||||
{
|
||||
proto_tree_add_string_hidden(tree, hf_mq_md_hidden_lastformat, tvb, tMsgProps.iOffsetFormat, 8, (const char*)sFormat);
|
||||
proto_item *hidden_item;
|
||||
hidden_item = proto_tree_add_string(tree, hf_mq_md_hidden_lastformat, tvb, tMsgProps.iOffsetFormat, 8, (const char*)sFormat);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
}
|
||||
}
|
||||
if (check_col(pinfo->cinfo, COL_INFO))
|
||||
|
|
|
@ -400,7 +400,7 @@ dissect_mtp3_3byte_pc(tvbuff_t *tvb, guint offset, proto_tree *tree, gint ett_pc
|
|||
int hf_pc_cluster, int hf_pc_member, int hf_dpc, int hf_pc)
|
||||
{
|
||||
guint32 pc;
|
||||
proto_item *pc_item;
|
||||
proto_item *pc_item, *hidden_item;
|
||||
proto_tree *pc_tree;
|
||||
char pc_string[MAX_STRUCTURED_PC_LENGTH];
|
||||
|
||||
|
@ -415,10 +415,12 @@ dissect_mtp3_3byte_pc(tvbuff_t *tvb, guint offset, proto_tree *tree, gint ett_pc
|
|||
*/
|
||||
g_snprintf(pc_string, sizeof(pc_string), "%u", pc);
|
||||
proto_item_append_text(pc_item, " (%s)", pc_string);
|
||||
proto_tree_add_string_hidden(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
|
||||
hidden_item = proto_tree_add_string(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
g_snprintf(pc_string, sizeof(pc_string), "0x%x", pc);
|
||||
proto_item_append_text(pc_item, " (%s)", pc_string);
|
||||
proto_tree_add_string_hidden(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
|
||||
hidden_item = proto_tree_add_string(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
|
||||
pc_tree = proto_item_add_subtree(pc_item, ett_pc);
|
||||
|
||||
|
@ -427,11 +429,14 @@ dissect_mtp3_3byte_pc(tvbuff_t *tvb, guint offset, proto_tree *tree, gint ett_pc
|
|||
proto_tree_add_uint(pc_tree, hf_pc_member, tvb, offset + ANSI_MEMBER_OFFSET, ANSI_NCM_LENGTH, pc);
|
||||
|
||||
/* add full integer values of DPC as hidden for filtering purposes */
|
||||
if (hf_dpc)
|
||||
proto_tree_add_uint_hidden(pc_tree, hf_dpc, tvb, offset, ANSI_PC_LENGTH, pc);
|
||||
if (hf_pc)
|
||||
proto_tree_add_uint_hidden(pc_tree, hf_pc, tvb, offset, ANSI_PC_LENGTH, pc);
|
||||
|
||||
if (hf_dpc) {
|
||||
hidden_item = proto_tree_add_uint(pc_tree, hf_dpc, tvb, offset, ANSI_PC_LENGTH, pc);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
}
|
||||
if (hf_pc) {
|
||||
hidden_item = proto_tree_add_uint(pc_tree, hf_pc, tvb, offset, ANSI_PC_LENGTH, pc);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -480,6 +485,7 @@ dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_t
|
|||
{
|
||||
guint32 label, dpc, opc;
|
||||
proto_item *label_item, *label_dpc_item, *label_opc_item;
|
||||
proto_item *hidden_item;
|
||||
proto_tree *label_tree;
|
||||
int *hf_dpc_string;
|
||||
int *hf_opc_string;
|
||||
|
@ -495,8 +501,10 @@ dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_t
|
|||
opc = (label & ITU_OPC_MASK) >> 14;
|
||||
dpc = label & ITU_DPC_MASK;
|
||||
|
||||
proto_tree_add_uint_hidden(label_tree, hf_mtp3_itu_pc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, opc);
|
||||
proto_tree_add_uint_hidden(label_tree, hf_mtp3_itu_pc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, dpc);
|
||||
hidden_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_pc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, opc);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
hidden_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_pc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, dpc);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
|
||||
label_dpc_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_dpc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, label);
|
||||
if (mtp3_pc_structured())
|
||||
|
@ -564,8 +572,10 @@ dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_t
|
|||
proto_item_append_text(label_opc_item, " (%s)", mtp3_pc_to_str(opc));
|
||||
}
|
||||
|
||||
proto_tree_add_item_hidden(label_tree, hf_mtp3_japan_pc, tvb, ROUTING_LABEL_OFFSET, JAPAN_PC_LENGTH, TRUE);
|
||||
proto_tree_add_item_hidden(label_tree, hf_mtp3_japan_pc, tvb, JAPAN_OPC_OFFSET, JAPAN_PC_LENGTH, TRUE);
|
||||
hidden_item = proto_tree_add_item(label_tree, hf_mtp3_japan_pc, tvb, ROUTING_LABEL_OFFSET, JAPAN_PC_LENGTH, TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
hidden_item = proto_tree_add_item(label_tree, hf_mtp3_japan_pc, tvb, JAPAN_OPC_OFFSET, JAPAN_PC_LENGTH, TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
|
||||
if (mtp3_use_japan_5_bit_sls) {
|
||||
proto_tree_add_item(label_tree, hf_mtp3_japan_5_bit_sls, tvb, JAPAN_SLS_OFFSET, JAPAN_SLS_SPARE_LENGTH, TRUE);
|
||||
|
|
Loading…
Reference in New Issue