Fix GCC build.

I'm not exactly sure what's up with the v150fw dissector, since
it defines a heuristic which is never used and registers in no tables.
The comments indicate it's carried over rtp, but rtp doesn't have a
heuristic table. Revision 43887 caused rtp to load a handle to v150fw,
but I've done a quick scan and I don't think it ever actually does anything
with the handle.

For now, #if 0 out the heuristic function to avoid compile errors. A better
fix is needed though.

svn path=/trunk/; revision=43890
This commit is contained in:
Evan Huus 2012-07-21 13:51:51 +00:00
parent 897d72c358
commit 6ed0c79956
2 changed files with 15 additions and 32 deletions

View File

@ -432,9 +432,7 @@ static const range_string sprt_payload_dlci1[] = {
};
static const true_false_string sprt_payload_ea_bit[] = {
"Last otcet of address feld",
"Another octet of address field follows"
{ "Last otcet of address feld", "Another octet of address field follows" }
};
static const range_string sprt_payload_dlci2[] = {
@ -612,7 +610,7 @@ static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* heuristic dissector */
static gboolean
dissect_sprt_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_sprt_heur(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_)
{
guint8 octet, extension_bit, reserved_bit, payload_type;
guint16 word, tc, seqnum;
@ -661,8 +659,8 @@ dissect_sprt_data(tvbuff_t *tvb,
proto_item *ti;
proto_tree *sprt_payload_tree, *field_subtree;
guint8 octet, payload_msgid, category_id;
guint8 three_bit_code, selcompr, mr_event_id;
guint16 word, category_info, category_count;
guint8 selcompr, mr_event_id;
guint16 word, category_count;
if(payload_length > 0)
{
@ -740,8 +738,6 @@ dissect_sprt_data(tvbuff_t *tvb,
{
word = tvb_get_ntohs(tvb, offset);
category_id = (word >> 12);
category_info = (word & 0x0FFF);
three_bit_code = (word & 0x0E00) >> 9;
ti = proto_tree_add_uint_format_value(sprt_payload_tree, hf_sprt_payload_msg_jminfo_category_data, tvb, offset, 2, word,
"Item #%d: %s (0x%04x)", category_count, val_to_str(category_id, sprt_jm_info_cat_id_name, "Unknown"), category_id);
@ -1127,15 +1123,14 @@ dissect_sprt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
proto_tree *sprt_tree;
proto_tree *sprt_ack_field_tree;
proto_tree *sprt_tree = NULL;
proto_tree *sprt_ack_field_tree = NULL;
guint16 word1;
unsigned int offset = 0;
guint payload_length;
struct _sprt_conversation_info *p_conv_data = NULL;
int i;
guint8 payload_type;
guint16 tc;
guint16 seqnum; /* 0 if TC = 0 or if no payload */
guint16 noa;
@ -1191,8 +1186,6 @@ dissect_sprt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
/* Get fields needed for further dissection */
payload_type = tvb_get_guint8(tvb, offset + 1) & 0x7F;
word1 = tvb_get_ntohs(tvb, offset + 2);
tc = (word1 & 0xC000) >> 14;
seqnum = word1 & 0x3FFF;
@ -3152,7 +3145,7 @@ proto_register_sprt(void)
proto_register_subtree_array(ett, array_length(ett));
/* register the dissector */
register_dissector("sprt", dissect_sprt, proto_sprt);
new_register_dissector("sprt", dissect_sprt, proto_sprt);
sprt_module = prefs_register_protocol(proto_sprt, NULL);

View File

@ -41,7 +41,7 @@
/* forward declaration we need below */
void proto_reg_handoff_v150fw(void);
static gboolean dissect_v150fw_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/* static gboolean dissect_v150fw_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); */
static int dissect_v150fw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/* Initialize the protocol & registered fields
@ -53,7 +53,6 @@ static int hf_v150fw_event_id = -1; /* 6 bits */
static int hf_v150fw_force_response_bit = -1;
static int hf_v150fw_extension_bit = -1;
static int hf_v150fw_reason_id_code_only = -1; /* 8 bits, only value is shown */
static int hf_v150fw_reason_id_code = -1; /* value & string */
static int hf_v150fw_reason_id_code_info = -1; /* 16 bits */
@ -263,14 +262,13 @@ static const value_string v150fw_ric_info_cleardown_type[] = {
};
#if 0
static gboolean
dissect_v150fw_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_v150fw_heur(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_)
{
guint8 octet1;
guint16 word1;
guint8 extb, ric;
guint16 ric_info, reserved, ext_len;
guint16 ric_info;
gint payload_length = tvb_length(tvb);
unsigned int offset = 0;
@ -289,13 +287,6 @@ dissect_v150fw_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(extb && payload_length <= 6) /* ext bit is set, but no extension found? */
return FALSE;
if(extb && payload_length >= 6) /* get optional extension fields if extb is set to true */
{
word1 = tvb_get_ntohs(tvb, offset + 4);
reserved = word1 & 0xF800;
ext_len = word1 & 0x07FF;
}
if(ric == 0 || (ric >= 6 && ric <= 31)) /* values reserved for future use */
return FALSE;
@ -323,16 +314,16 @@ dissect_v150fw_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return TRUE;
}
#endif
static int
dissect_v150fw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_v150fw(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
proto_tree *v150fw_tree, *field_tree;
guint8 extb, ric;
guint16 ric_info, ext_len;
guint16 ext_len;
gint payload_length;
unsigned int offset = 0;
@ -347,7 +338,6 @@ dissect_v150fw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Get fields needed for further dissection */
extb = tvb_get_guint8(tvb, offset) & 0x01; /* extension bit */
ric = tvb_get_guint8(tvb, offset + 1);
ric_info = tvb_get_ntohs(tvb, offset + 2);
if(extb && payload_length >= 6) /* get optional extension fields */
ext_len = tvb_get_ntohs(tvb, offset + 4) & 0x07FF;
@ -822,7 +812,7 @@ proto_register_v150fw(void)
proto_register_subtree_array(ett, array_length(ett));
/* register the dissector */
register_dissector("v150fw", dissect_v150fw, proto_v150fw);
new_register_dissector("v150fw", dissect_v150fw, proto_v150fw);
}
void