aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2004-05-10 08:29:18 +0000
committerUlf Lamping <ulf.lamping@web.de>2004-05-10 08:29:18 +0000
commit685195c073051cbede7038181b3b5ef32527481c (patch)
treefe8a77f1c7ea699d86268f44be6e4f638f413538 /epan/proto.h
parent63eb447d7e1dc2c404f214039ea970def28de4a3 (diff)
first try to get rid of annoying double definition of the proto_tree_add_xy_fromat functions,
because of GNUC printf format checks svn path=/trunk/; revision=10837
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/epan/proto.h b/epan/proto.h
index 4b3d5e9666..9fc5240104 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.63 2004/05/09 10:03:40 guy Exp $
+ * $Id: proto.h,v 1.64 2004/05/10 08:29:18 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -252,6 +252,12 @@ extern proto_item* proto_tree_get_parent(proto_tree *tree);
+#if __GNUC__ >= 2
+ #define GNUC_FORMAT_CHECK(archetype, string_index, first_to_check) __attribute__((format (archetype, string_index, first_to_check)))
+#else
+ #define GNUC_FORMAT_CHECK(archetype, string_index, first_to_check)
+#endif
+
/* Add an item to a proto_tree, using the text label registered to that item;
the item is extracted from the tvbuff handed to it. */
@@ -264,16 +270,9 @@ proto_tree_add_item_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, gboolean little_endian);
/* Add a FT_NONE to a proto_tree */
-#if __GNUC__ >= 2
-extern proto_item *
-proto_tree_add_none_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const char *format, ...)
- __attribute__((format (printf, 6, 7)));
-#else
extern proto_item *
proto_tree_add_none_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const char *format, ...);
-#endif
+ gint length, const char *format, ...) GNUC_FORMAT_CHECK(printf,6,7);
/* Add a FT_PROTOCOL to a proto_tree */
#if __GNUC__ >= 2