fix a lot more warnings

svn path=/trunk/; revision=21142
This commit is contained in:
Ulf Lamping 2007-03-23 01:29:52 +00:00
parent 411249419d
commit 7994794ad9
14 changed files with 29 additions and 29 deletions

View File

@ -1309,9 +1309,9 @@ dissect_diameter_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
vendorName="None";
}
/* Do the bit twiddling */
version = DIAM_GET_VERSION(dh);
version = (guint8) DIAM_GET_VERSION(dh);
pktLength = DIAM_GET_LENGTH(dh);
flags = DIAM_GET_FLAGS(dh);
flags = (guint8) DIAM_GET_FLAGS(dh);
commandCode = DIAM_GET_COMMAND(dh);
break;
case DIAMETER_RFC:
@ -1332,9 +1332,9 @@ dissect_diameter_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
applicationName="None";
}
/* Do the bit twiddling */
version = DIAM_GET_VERSION(dh2);
version = (guint8) DIAM_GET_VERSION(dh2);
pktLength = DIAM_GET_LENGTH(dh2);
flags = DIAM_GET_FLAGS(dh2);
flags = (guint8) DIAM_GET_FLAGS(dh2);
commandCode = DIAM_GET_COMMAND(dh2);
break;
}

View File

@ -2001,7 +2001,7 @@ static gint dissect_dmp_envelope (tvbuff_t *tvb, packet_info *pinfo _U_,
if (secs == -1 || secs == -2) {
proto_item_append_text (tf, "Reserved (0x%2.2x)", time_diff);
} else {
proto_item_append_text (tf, "%s", time_secs_to_str (secs));
proto_item_append_text (tf, "%s", time_secs_to_str ( (gint32) secs));
}
offset += 1;
}
@ -2343,8 +2343,8 @@ static gint dissect_dmp_report (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_item_append_text (ei, " (0 seconds)");
} else {
proto_item_append_text (tf, "%s (offset from the original message"
" submission time)", time_secs_to_str (secs));
proto_item_append_text (ei, " (%s)", time_secs_to_str (secs));
" submission time)", time_secs_to_str ((gint32) secs));
proto_item_append_text (ei, " (%s)", time_secs_to_str ((gint32) secs));
}
} else {
dmp.ndr = TRUE;
@ -2457,7 +2457,7 @@ static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_item_append_text (tf, "Reserved (0x%2.2x)", rec_time);
} else {
proto_item_append_text (tf, "%s (offset from the original message"
" submission time)", time_secs_to_str (secs));
" submission time)", time_secs_to_str ((gint32) secs));
}
offset += 1;
@ -2799,7 +2799,7 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo _U_,
} else if (secs == -1 || secs == -2) {
proto_item_append_text (tf, "Reserved (0x%2.2x)", exp_time);
} else {
proto_item_append_text (tf, "%s (%s)", time_secs_to_str (secs),
proto_item_append_text (tf, "%s (%s)", time_secs_to_str ((gint32) secs),
abs_time_secs_to_str (dmp.subm_time + secs));
}
offset += 1;
@ -2825,7 +2825,7 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo _U_,
dtg_sign.false_string,
abs_time_secs_to_str (dmp.subm_time));
} else {
proto_item_append_text (tf, "%s in the %s (%s)", time_secs_to_str(secs),
proto_item_append_text (tf, "%s in the %s (%s)", time_secs_to_str((gint32) secs),
(dtg & 0x80) ? dtg_sign.true_string :
dtg_sign.false_string, (dtg & 0x80) ?
abs_time_secs_to_str (dmp.subm_time + secs) :

View File

@ -551,11 +551,11 @@ dissect_dtls_record(tvbuff_t *tvb, packet_info *pinfo,
if(ssl){
if(ssl_packet_from_server(dtls_associations, pinfo->srcport, pinfo->ptype == PT_TCP)){
ssl->server.seq=sequence_number;
ssl->server.seq=(guint32)sequence_number;
ssl->server.epoch=epoch;
}
else{
ssl->client.seq=sequence_number;
ssl->client.seq=(guint32)sequence_number;
ssl->client.epoch=epoch;
}
}

View File

@ -622,7 +622,7 @@ dissect_fmp_timeval(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
if (time_tree) {
proto_tree_add_uint(time_tree, hf_time_sec, tvb, offset, 4,
ts.secs);
(guint32) ts.secs);
proto_tree_add_uint(time_tree, hf_time_nsec, tvb, offset+4, 4,
ts.nsecs);
}

View File

@ -1358,13 +1358,13 @@ static void iax2_add_ts_fields(packet_info * pinfo, proto_tree * iax2_tree, iax_
if(iax_packet->abstime.secs == -1) {
time_t start_secs = iax_packet->call_data->start_time.secs;
gint32 abs_secs = start_secs + longts/1000;
gint32 abs_secs = (gint32) (start_secs + longts/1000);
/* deal with short timestamps by assuming that packets are never more than
* 16 seconds late */
while(abs_secs < pinfo->fd->abs_ts.secs - 16) {
longts += 32768;
abs_secs = start_secs + longts/1000;
abs_secs = (gint32) (start_secs + longts/1000);
}
iax_packet->abstime.secs=abs_secs;

View File

@ -3854,7 +3854,7 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo,
/* Davide Schiera (2006-11-21): enable TKIP and CCMP decryption */
/* checking for the trailer */
if (next_tvb!=NULL) {
if (reported_len < sec_trailer) {
if (reported_len < (gint) sec_trailer) {
/* There is no space for a trailer, ignore it and don't decrypt */
;
} else if (len < reported_len) {

View File

@ -990,7 +990,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
proto_tree_add_item(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, FALSE);
proto_tree_add_item(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, FALSE);
if(ahsLen > 0) {
int ahs_offset=offset+48;
guint ahs_offset=offset+48;
guint16 ahs_length=0;
guint8 ahs_type=0;
@ -2358,7 +2358,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean chec
conversation_set_dissector(conversation, iscsi_handle);
}
/* try to autodetect if header digest is used or not */
if(digestsActive && (available_bytes>=(48+4+ahsLen*4)) && (iscsi_session->header_digest==ISCSI_HEADER_DIGEST_AUTO) ){
if(digestsActive && (available_bytes>=(guint32) (48+4+ahsLen*4)) && (iscsi_session->header_digest==ISCSI_HEADER_DIGEST_AUTO) ){
guint32 crc;
/* we have enough data to test if HeaderDigest is enabled */
crc= ~calculateCRC32(tvb_get_ptr(tvb, offset, 48+ahsLen*4), 48+ahsLen*4, CRC32C_PRELOAD);

View File

@ -2077,7 +2077,7 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
break;
}
offset += content_len;
offset += (guint) content_len;
}
} else {
available = tvb_reported_length_remaining(tvb, offset);
@ -2094,7 +2094,7 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
break;
}
offset += content_len;
offset += (guint) content_len;
}
}
@ -2253,7 +2253,7 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
}
/* content */
element_content_tvb = tvb_new_subset(tvb, tree_offset, content_len, content_len);
element_content_tvb = tvb_new_subset(tvb, tree_offset, (gint)content_len, (gint)content_len);
if (mediatype) {
if (0 == strcmp("application/x-jxta-tls-block", mediatype)) {
@ -2287,7 +2287,7 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
/* display it as raw data */
call_dissector(data_handle, element_content_tvb, pinfo, jxta_elem_tree);
}
tree_offset += content_len;
tree_offset += (guint) content_len;
/* process the signature element */
if ((flags & JXTAMSG2_ELMFLAG_SIGNATURE) != 0) {

View File

@ -339,7 +339,7 @@ get_nbns_name(tvbuff_t *tvb, int offset, int nbns_data_offset,
/* This one is; make its name printable. */
name_type = process_netbios_name(nbname, name_ret, name_ret_len);
pname_ret += MIN(strlen(name_ret), name_ret_len);
pname_ret += MIN(strlen(name_ret), (size_t) name_ret_len);
pname_ret += MIN(name_ret_len-(pname_ret-name_ret),
g_snprintf(pname_ret, name_ret_len-(pname_ret-name_ret), "<%02x>", name_type));
if (cname == '.') {

View File

@ -642,7 +642,7 @@ dissect_sss_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, ncp
{
msg_length = tvb_get_letohl(tvb, foffset);
foffset += 4;
if (tvb_length_remaining(tvb, foffset) < msg_length)
if (tvb_length_remaining(tvb, foffset) < (gint) msg_length)
{
proto_tree_add_item(atree, hf_enc_data, tvb, foffset, -1, TRUE);
}

View File

@ -567,7 +567,7 @@ store_nfs_file_handle(nfs_fhandle_data_t *nfs_fh)
new_nfs_fh=se_alloc(sizeof(nfs_fhandle_data_t));
new_nfs_fh->len=nfs_fh->len;
new_nfs_fh->fh=se_alloc(sizeof(guint32)*(nfs_fh->len/4));
memcpy(new_nfs_fh->fh, nfs_fh->fh, nfs_fh->len);
memcpy( (void *) new_nfs_fh->fh, nfs_fh->fh, nfs_fh->len);
new_nfs_fh->tvb=tvb_new_real_data(new_nfs_fh->fh, new_nfs_fh->len, new_nfs_fh->len);
fhlen=nfs_fh->len/4;
fhkey[0].length=1;
@ -1275,7 +1275,7 @@ dissect_fhandle_data_NETAPP_V4(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree
guint32 handle_type = tvb_get_ntohl(tvb, offset + 24);
guint32 inum = tvb_get_ntohl(tvb, offset + 12);
char *handle_string=NULL;
const char *handle_string=NULL;
const char *handle_type_strings [] = { "NORMAL",
"UNEXP",
"VOLDIR",

View File

@ -1793,7 +1793,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
break;
}
for(i = 0; i < num_bcs; i++) {
for(i = 0; i < (int) num_bcs; i++) {
proto_tree_add_text(stlv_tree, tvb, stlv_offset+8+(i*4), 4,
"BC %d: %.10g bytes/s (%.0f bits/s)", i,
tvb_get_ntohieee_float(tvb, stlv_offset + 8 + i*4),

View File

@ -3070,7 +3070,7 @@ pvfs2_io_tracking_hash(gconstpointer k)
{
const pvfs2_io_tracking_key_t *key = (const pvfs2_io_tracking_key_t *) k;
return (key->tag >> 32) ^ ((guint32) key->tag);
return (guint) ((key->tag >> 32) ^ ((guint32) key->tag));
}
static void

View File

@ -198,7 +198,7 @@ static gint radius_call_equal(gconstpointer k1, gconstpointer k2)
nstime_t delta;
nstime_delta(&delta, &key1->req_time, &key2->req_time);
if (abs(nstime_to_sec(&delta)) > (double) 5) return 0;
if (abs( (int) nstime_to_sec(&delta)) > (double) 5) return 0;
if (key1->code == key2->code)
return 1;