diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-03-06 19:41:06 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-03-06 19:41:06 +0000 |
commit | 4eef37302b59397007b78d93c7fa41c0977fe852 (patch) | |
tree | 98df7dcfc59e146a8bc9b286d8369312c382e5a1 /packet-ipp.c | |
parent | a8f68d3284ce9aa767f3130808f7ca8f662110ca (diff) |
Fix a call to "proto_tree_add_text()", and declare "name_length" in such
a fashion as not to cause GCC to whine about format/argument mismatches
if "proto.h" is tweaked to declare "proto_tree_add_text()" with an
"__attribute__((format (printf, ...))" clause.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1693 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ipp.c')
-rw-r--r-- | packet-ipp.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/packet-ipp.c b/packet-ipp.c index b70fb6fb58..049f809715 100644 --- a/packet-ipp.c +++ b/packet-ipp.c @@ -3,7 +3,7 @@ * * Guy Harris <guy@alum.mit.edu> * - * $Id: packet-ipp.c,v 1.4 2000/01/22 06:22:13 guy Exp $ + * $Id: packet-ipp.c,v 1.5 2000/03/06 19:41:06 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -144,19 +144,19 @@ static const value_string status_vals[] = { static int parse_attributes(const u_char *pd, int offset, frame_data *fd, proto_tree *tree); static proto_tree *add_integer_tree(proto_tree *tree, const u_char *pd, - int offset, guint name_length, guint value_length); + int offset, int name_length, guint value_length); static void add_integer_value(guint tag, gchar *tag_desc, proto_tree *tree, const u_char *pd, int offset, guint name_length, guint value_length); static proto_tree *add_octetstring_tree(proto_tree *tree, const u_char *pd, - int offset, guint name_length, guint value_length); + int offset, int name_length, guint value_length); static void add_octetstring_value(guint tag, gchar *tag_desc, proto_tree *tree, const u_char *pd, int offset, guint name_length, guint value_length); static proto_tree *add_charstring_tree(proto_tree *tree, const u_char *pd, - int offset, guint name_length, guint value_length); + int offset, int name_length, guint value_length); static void add_charstring_value(guint tag, gchar *tag_desc, proto_tree *tree, - const u_char *pd, int offset, guint name_length, guint value_length); + const u_char *pd, int offset, int name_length, guint value_length); static int add_value_head(guint tag, gchar *tag_desc, proto_tree *tree, - const u_char *pd, int offset, guint name_length, guint value_length); + const u_char *pd, int offset, int name_length, guint value_length); void dissect_ipp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { @@ -453,7 +453,7 @@ parse_attributes(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) static proto_tree * add_integer_tree(proto_tree *tree, const u_char *pd, int offset, - guint name_length, guint value_length) + int name_length, guint value_length) { proto_item *ti; @@ -487,7 +487,7 @@ add_integer_value(guint tag, gchar *tag_desc, proto_tree *tree, static proto_tree * add_octetstring_tree(proto_tree *tree, const u_char *pd, int offset, - guint name_length, guint value_length) + int name_length, guint value_length) { proto_item *ti; @@ -495,8 +495,8 @@ add_octetstring_tree(proto_tree *tree, const u_char *pd, int offset, 1 + 2 + name_length + 2 + value_length, "%.*s: %s", name_length, - &pd[offset + 1 + 2]); - bytes_to_str(&pd[offset + 1 + 2 + name_length + 2], value_length); + &pd[offset + 1 + 2], + bytes_to_str(&pd[offset + 1 + 2 + name_length + 2], value_length)); return proto_item_add_subtree(ti, ett_ipp_attr); } @@ -512,7 +512,7 @@ add_octetstring_value(guint tag, gchar *tag_desc, proto_tree *tree, static proto_tree * add_charstring_tree(proto_tree *tree, const u_char *pd, int offset, - guint name_length, guint value_length) + int name_length, guint value_length) { proto_item *ti; @@ -526,7 +526,7 @@ add_charstring_tree(proto_tree *tree, const u_char *pd, int offset, static void add_charstring_value(guint tag, gchar *tag_desc, proto_tree *tree, - const u_char *pd, int offset, guint name_length, guint value_length) + const u_char *pd, int offset, int name_length, guint value_length) { offset = add_value_head(tag, tag_desc, tree, pd, offset, name_length, value_length); @@ -536,7 +536,7 @@ add_charstring_value(guint tag, gchar *tag_desc, proto_tree *tree, static int add_value_head(guint tag, gchar *tag_desc, proto_tree *tree, - const u_char *pd, int offset, guint name_length, guint value_length) + const u_char *pd, int offset, int name_length, guint value_length) { proto_tree_add_text(tree, offset, 1, "Tag: %s", tag_desc); offset += 1; |