diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-05-15 12:08:20 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-05-15 12:08:20 +0000 |
commit | 558c1b5ee62c85cc5065849a162599e36eb44d1e (patch) | |
tree | d36a6bd173e6291e36c72375f2430a0992d6a09d /epan | |
parent | 931cc922a14049c904a6ac416656c36caf01d6b3 (diff) |
Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25306
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-mpls-echo.c | 7 | ||||
-rw-r--r-- | epan/dissectors/packet-mq.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-mtp3.c | 34 |
3 files changed, 30 insertions, 15 deletions
diff --git a/epan/dissectors/packet-mpls-echo.c b/epan/dissectors/packet-mpls-echo.c index 4643cedbe4..b8a0c82d0d 100644 --- a/epan/dissectors/packet-mpls-echo.c +++ b/epan/dissectors/packet-mpls-echo.c @@ -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, diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c index 545d6c49fa..9c86285bfc 100644 --- a/epan/dissectors/packet-mq.c +++ b/epan/dissectors/packet-mq.c @@ -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)) diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c index 4c23a28d22..57a599b46d 100644 --- a/epan/dissectors/packet-mtp3.c +++ b/epan/dissectors/packet-mtp3.c @@ -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); |