From 07a8d1b55ae414404720bad07cb4b5a81efaf9a2 Mon Sep 17 00:00:00 2001 From: Jakub Zawadzki Date: Sat, 14 Dec 2013 16:47:52 +0000 Subject: xmpp_attr_info, xmpp_attr_info_ext: Pass pointer to hf This should fix most of warnings: initializer element is not computable at load time svn path=/trunk/; revision=54097 --- epan/dissectors/packet-xmpp-utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-xmpp-utils.h') diff --git a/epan/dissectors/packet-xmpp-utils.h b/epan/dissectors/packet-xmpp-utils.h index 0a522a2150..8b6327f113 100644 --- a/epan/dissectors/packet-xmpp-utils.h +++ b/epan/dissectors/packet-xmpp-utils.h @@ -78,7 +78,7 @@ typedef struct _xmpp_element_t{ /*informations about attributes that are displayed in proto tree*/ typedef struct _xmpp_attr_info{ const gchar *name; - gint hf; + const gint *phf; gboolean is_required; gboolean in_short_list; @@ -239,7 +239,7 @@ extern gpointer xmpp_name_attr_struct(const gchar *name, const gchar *attr_name, * - val_func - validate function * - data - data passes to the val_func */ -extern void xmpp_display_attrs(proto_tree *tree, xmpp_element_t *element, packet_info *pinfo, tvbuff_t *tvb, xmpp_attr_info *attrs, guint n); +extern void xmpp_display_attrs(proto_tree *tree, xmpp_element_t *element, packet_info *pinfo, tvbuff_t *tvb, const xmpp_attr_info *attrs, guint n); /** Function does the same as shown above. It takes attrs(XMPP_ATTR_INFO_EXT) argument * that contains XMPP_ATTR_INFO struct and string with namespace. It is used when packet @@ -253,7 +253,7 @@ extern void xmpp_display_attrs(proto_tree *tree, xmpp_element_t *element, packet * * @endcode */ -extern void xmpp_display_attrs_ext(proto_tree *tree, xmpp_element_t *element, packet_info *pinfo, tvbuff_t *tvb, xmpp_attr_info_ext *attrs, guint n); +extern void xmpp_display_attrs_ext(proto_tree *tree, xmpp_element_t *element, packet_info *pinfo, tvbuff_t *tvb, const xmpp_attr_info_ext *attrs, guint n); /** Displays elements from parent element in a way described in elems(XMPP_ELEM_INFO). * XMPP_ELEM_INFO describes how to find particular element and what action should be done -- cgit v1.2.3