diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-04-22 17:57:10 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-04-22 17:57:10 +0000 |
commit | ecf8cbed340ed4b628cb5c102e804ceab0dc8afd (patch) | |
tree | 6be0f7f2738709beacc0e169a489366ec4dd7430 /epan/proto.h | |
parent | 939731ee8ec1cd5e1f71ec95a85ed2734c1551a9 (diff) |
As suggested by Jakub Zawadzki:
Rename g_gnuc_malloc.h to g_gnuc.h (since it contains non-malloc related
GNUC stuff).
Use G_GNUC_WARN_UNUSED_RESULT from glib instead of using warn_unused_result
directly.
svn path=/trunk/; revision=36825
Diffstat (limited to 'epan/proto.h')
-rw-r--r-- | epan/proto.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/epan/proto.h b/epan/proto.h index facce64cc8..ce363147ea 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -51,6 +51,7 @@ #include "tvbuff.h" #include "ftypes/ftypes.h" #include "register.h" +#include "g_gnuc.h" #ifdef __cplusplus extern "C" { @@ -514,18 +515,11 @@ 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) WARN_IF_UNUSED; +extern proto_tree* proto_item_add_subtree(proto_item *ti, const gint idx) G_GNUC_WARN_UNUSED_RESULT; /** Get an existing subtree under an item. @param ti the parent item of the subtree |