diff options
-rw-r--r-- | epan/proto.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/epan/proto.h b/epan/proto.h index 4d01bf29b4..1a599d6bc7 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -514,13 +514,18 @@ extern void proto_cleanup(void); */ extern gboolean proto_field_is_referenced(proto_tree *tree, int proto_id); - +/* XXX where should this go? */ +#ifdef __GNUC__ +#define WARN_IF_UNUSED __attribute__ ((warn_unused_result)) +#else +#define WARN_IF_UNUSED +#endif /** Create a subtree under an existing item. @param ti the parent item of the new subtree @param idx one of the ett_ array elements registered with proto_register_subtree_array() @return the new subtree */ -extern proto_tree* proto_item_add_subtree(proto_item *ti, const gint idx); +extern proto_tree* proto_item_add_subtree(proto_item *ti, const gint idx) WARN_IF_UNUSED; /** Get an existing subtree under an item. @param ti the parent item of the subtree |