Fix some more warnings under gcc 4.0
svn path=/trunk/; revision=21237
This commit is contained in:
parent
fc9e7b97ba
commit
8dabc0ded1
|
@ -4368,9 +4368,9 @@ dissect_kerberos_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
gboolean dci, gboolean do_col_protocol, gboolean have_rm,
|
||||
kerberos_callbacks *cb)
|
||||
{
|
||||
int offset = 0;
|
||||
proto_tree *kerberos_tree = NULL;
|
||||
proto_item *item = NULL;
|
||||
volatile int offset = 0;
|
||||
proto_tree *volatile kerberos_tree = NULL;
|
||||
proto_item *volatile item = NULL;
|
||||
void *saved_private_data;
|
||||
|
||||
/* TCP record mark and length */
|
||||
|
|
|
@ -183,7 +183,7 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
* *KISMET: {Version} {Start time} \001{Server name}\001 {Build Revision}
|
||||
* two fields left undocumented: {???} {?ExtendedVersion?}
|
||||
*/
|
||||
if (!strncmp(reqresp, "*KISMET", 7)) {
|
||||
if (!strncmp((char*)reqresp, "*KISMET", 7)) {
|
||||
offset += next_token - line;
|
||||
linelen -= next_token - line;
|
||||
line = next_token;
|
||||
|
@ -236,7 +236,7 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
/*
|
||||
* *TIME: {Time}
|
||||
*/
|
||||
if (!strncmp(reqresp, "*TIME", 5)) {
|
||||
if (!strncmp((char*)reqresp, "*TIME", 5)) {
|
||||
time_t t;
|
||||
char *ptr;
|
||||
|
||||
|
@ -278,10 +278,10 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
static gboolean
|
||||
response_is_continuation(const guchar * data)
|
||||
{
|
||||
if (!strncmp(data, "*", 1))
|
||||
if (!strncmp((char*)data, "*", 1))
|
||||
return FALSE;
|
||||
|
||||
if (!strncmp(data, "!", 1))
|
||||
if (!strncmp((char*)data, "!", 1))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -1180,7 +1180,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
|
|||
hf_mmse_prev_sent_by,
|
||||
tvb, offset - 1, 1 + count + length,
|
||||
strval, "%s (Forwarded-count=%u)",
|
||||
format_text(strval, strlen(strval)),
|
||||
format_text((guchar*)strval, strlen(strval)),
|
||||
fwd_count);
|
||||
subtree = proto_item_add_subtree(ti,
|
||||
ett_mmse_hdr_details);
|
||||
|
@ -1217,7 +1217,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
|
|||
hf_mmse_prev_sent_date,
|
||||
tvb, offset - 1, 1 + count + length,
|
||||
strval, "%s (Forwarded-count=%u)",
|
||||
format_text(strval, strlen(strval)),
|
||||
format_text((guchar*)strval, strlen(strval)),
|
||||
fwd_count);
|
||||
subtree = proto_item_add_subtree(ti,
|
||||
ett_mmse_hdr_details);
|
||||
|
@ -1256,7 +1256,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
|
|||
proto_tree_add_text(mmse_tree, tvb, offset - 1,
|
||||
length + 1, "%s: %s (Not decoded)",
|
||||
hdr_name,
|
||||
format_text(strval, strlen(strval)));
|
||||
format_text((guchar*)strval, strlen(strval)));
|
||||
}
|
||||
} else { /* General form with length */
|
||||
if (peek == 0x1F) { /* Value length in guintvar */
|
||||
|
@ -1292,8 +1292,8 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
|
|||
(const char *) tvb_get_ptr(
|
||||
tvb, offset, length + length2),
|
||||
"%s: %s",
|
||||
format_text(strval, strlen(strval)),
|
||||
format_text(strval2, strlen(strval2)));
|
||||
format_text((guchar*)strval, strlen(strval)),
|
||||
format_text((guchar*)strval2, strlen(strval2)));
|
||||
}
|
||||
offset += length + length2;
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ dissect_mount_dirpath_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
unsigned const char *dir;
|
||||
int len;
|
||||
|
||||
host=ip_to_str(pinfo->dst.data);
|
||||
host=(unsigned char*)ip_to_str(pinfo->dst.data);
|
||||
len=tvb_get_ntohl(tvb, offset);
|
||||
if (len >= ITEM_LABEL_LENGTH)
|
||||
THROW(ReportedBoundsError);
|
||||
|
@ -180,16 +180,16 @@ dissect_mount_dirpath_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
dir=tvb_get_ptr(tvb, offset+4, len);
|
||||
if(dir){
|
||||
unsigned char *ptr;
|
||||
name=g_malloc(strlen(host)+1+len+1+200);
|
||||
name=(unsigned char*)g_malloc(strlen(host)+1+len+1+200);
|
||||
ptr=name;
|
||||
memcpy(ptr, host, strlen(host));
|
||||
ptr+=strlen(host);
|
||||
memcpy(ptr, host, strlen((char*)host));
|
||||
ptr+=strlen((char*)host);
|
||||
*ptr++=':';
|
||||
memcpy(ptr, dir, len);
|
||||
ptr+=len;
|
||||
*ptr=0;
|
||||
|
||||
nfs_name_snoop_add_name(civ->xid, tvb, -1, strlen(name), 0, 0, name);
|
||||
nfs_name_snoop_add_name(civ->xid, tvb, -1, strlen((char*)name), 0, 0, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -417,7 +417,7 @@ find_end_line(tvbuff_t *tvb, gint start)
|
|||
if (linelen == -1) {
|
||||
return -1;
|
||||
}
|
||||
if (tvb_strneql(tvb, next_offset, (const guint8 *)"-------", 7) == 0)
|
||||
if (tvb_strneql(tvb, next_offset, (const gchar *)"-------", 7) == 0)
|
||||
return next_offset;
|
||||
offset = next_offset;
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
token_2_len = space_offset - token_2_start;
|
||||
|
||||
/* Transaction ID found store it for later use */
|
||||
transaction_id_str = tvb_get_ephemeral_string(tvb, token_2_start, token_2_len);
|
||||
transaction_id_str = (char*)tvb_get_ephemeral_string(tvb, token_2_start, token_2_len);
|
||||
|
||||
/* Look for another space in this line to indicate a 4th token */
|
||||
token_3_start = space_offset + 1;
|
||||
|
@ -590,7 +590,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
reqresp_tree = proto_item_add_subtree(th, ett_msrp_reqresp);
|
||||
proto_tree_add_item(reqresp_tree,hf_msrp_transactionID,tvb,token_2_start,token_2_len,FALSE);
|
||||
proto_tree_add_uint(reqresp_tree,hf_msrp_status_code,tvb,token_3_start,token_3_len,
|
||||
atoi(tvb_get_string(tvb, token_3_start, token_3_len)));
|
||||
atoi((char*)tvb_get_string(tvb, token_3_start, token_3_len)));
|
||||
|
||||
}else{
|
||||
th = proto_tree_add_item(msrp_tree,hf_msrp_request_line,tvb,0,linelen,FALSE);
|
||||
|
@ -654,7 +654,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
* Fetch the value.
|
||||
*/
|
||||
value_len = line_end_offset - value_offset;
|
||||
value = tvb_get_ephemeral_string(tvb, value_offset,
|
||||
value = (char*)tvb_get_ephemeral_string(tvb, value_offset,
|
||||
value_len);
|
||||
|
||||
/*
|
||||
|
@ -684,10 +684,10 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
parameter_offset++;
|
||||
content_type_len = semi_colon_offset - value_offset;
|
||||
content_type_parameter_str_len = line_end_offset - parameter_offset;
|
||||
content_type_parameter_str = tvb_get_ephemeral_string(tvb, parameter_offset,
|
||||
content_type_parameter_str_len);
|
||||
content_type_parameter_str = (char*)tvb_get_ephemeral_string(tvb,
|
||||
parameter_offset, content_type_parameter_str_len);
|
||||
}
|
||||
media_type_str = tvb_get_ephemeral_string(tvb, value_offset, content_type_len);
|
||||
media_type_str = (char*)tvb_get_ephemeral_string(tvb, value_offset, content_type_len);
|
||||
#if GLIB_MAJOR_VERSION < 2
|
||||
media_type_str_lower_case = g_strdup(media_type_str);
|
||||
g_strdown(media_type_str_lower_case);
|
||||
|
|
Loading…
Reference in New Issue