From b2467fddb1d83a0667970968493a9dad1dfb0be1 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 11 Oct 2017 08:54:12 -0700 Subject: ProtoBuf: Remove an unused variable. Remove protobuf_message_direction_type: ../epan/dissectors/packet-protobuf.c:125:20: error: unused variable 'protobuf_message_direction_type' [-Werror,-Wunused-const-variable] VALUE_STRING_ARRAY(protobuf_message_direction_type); ^ Have dissect_one_protobuf_field return a gboolean while we're here. Change-Id: I5d9d2e3414b5668ca26d5c0a450225c3cdf5da56 Reviewed-on: https://code.wireshark.org/review/23887 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- epan/dissectors/packet-protobuf.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/epan/dissectors/packet-protobuf.c b/epan/dissectors/packet-protobuf.c index 3eb38429bb..4ee4ea56ba 100644 --- a/epan/dissectors/packet-protobuf.c +++ b/epan/dissectors/packet-protobuf.c @@ -116,14 +116,6 @@ static int protobuf_wire_to_field_type[6][9] = { PROTOBUF_TYPE_NONE } }; -/* request or response message type */ -#define protobuf_message_direction_type_VALUE_STRING_LIST(XXX) \ - XXX(PROTOBUF_MESSAGE_REQUEST, 0, "request") \ - XXX(PROTOBUF_MESSAGE_RESPONSE, 1, "response") - -VALUE_STRING_ENUM(protobuf_message_direction_type); -VALUE_STRING_ARRAY(protobuf_message_direction_type); - void proto_register_protobuf(void); void proto_reg_handoff_protobuf(void); @@ -381,7 +373,7 @@ protobuf_try_dissect_field_value_on_multi_types(proto_tree *value_tree, tvbuff_t } } -static guint +static gboolean dissect_one_protobuf_field(tvbuff_t *tvb, guint* offset, guint maxlen, packet_info *pinfo, proto_tree *protobuf_tree, void *data) { -- cgit v1.2.3