aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2007-03-23 01:29:52 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2007-03-23 01:29:52 +0000
commitc2b9e6bf7dfa9c9af48185da963e2f724a01bc92 (patch)
treee71a9ea8b4ff5d1244f454616e128c9737b090ba /epan/dissectors
parent23265ea379ebffdf650e44cbb0cee5856777d24f (diff)
fix a lot more warnings
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21142 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-diameter.c8
-rw-r--r--epan/dissectors/packet-dmp.c12
-rw-r--r--epan/dissectors/packet-dtls.c4
-rw-r--r--epan/dissectors/packet-fmp.c2
-rw-r--r--epan/dissectors/packet-iax2.c4
-rw-r--r--epan/dissectors/packet-ieee80211.c2
-rw-r--r--epan/dissectors/packet-iscsi.c4
-rw-r--r--epan/dissectors/packet-jxta.c8
-rw-r--r--epan/dissectors/packet-nbns.c2
-rw-r--r--epan/dissectors/packet-ncp-sss.c2
-rw-r--r--epan/dissectors/packet-nfs.c4
-rw-r--r--epan/dissectors/packet-ospf.c2
-rw-r--r--epan/dissectors/packet-pvfs2.c2
-rw-r--r--epan/dissectors/packet-radius.c2
14 files changed, 29 insertions, 29 deletions
diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c
index 81832a1a33..a302f04f3b 100644
--- a/epan/dissectors/packet-diameter.c
+++ b/epan/dissectors/packet-diameter.c
@@ -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;
}
diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c
index ebbd455d83..7275c86884 100644
--- a/epan/dissectors/packet-dmp.c
+++ b/epan/dissectors/packet-dmp.c
@@ -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) :
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index 591afdc3ad..605e3025e2 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -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;
}
}
diff --git a/epan/dissectors/packet-fmp.c b/epan/dissectors/packet-fmp.c
index 8ba9fe0337..0665ded564 100644
--- a/epan/dissectors/packet-fmp.c
+++ b/epan/dissectors/packet-fmp.c
@@ -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);
}
diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c
index 0bffa818e7..531b37a0a9 100644
--- a/epan/dissectors/packet-iax2.c
+++ b/epan/dissectors/packet-iax2.c
@@ -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;
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index fe3cdb927f..8612f180eb 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -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) {
diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c
index 55ffea171b..c5c5dd2cdc 100644
--- a/epan/dissectors/packet-iscsi.c
+++ b/epan/dissectors/packet-iscsi.c
@@ -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);
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c
index d34925c10f..fee26d1ca7 100644
--- a/epan/dissectors/packet-jxta.c
+++ b/epan/dissectors/packet-jxta.c
@@ -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) {
diff --git a/epan/dissectors/packet-nbns.c b/epan/dissectors/packet-nbns.c
index 1932011854..32ee7e72a8 100644
--- a/epan/dissectors/packet-nbns.c
+++ b/epan/dissectors/packet-nbns.c
@@ -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 == '.') {
diff --git a/epan/dissectors/packet-ncp-sss.c b/epan/dissectors/packet-ncp-sss.c
index 6d4840e9e7..b504667192 100644
--- a/epan/dissectors/packet-ncp-sss.c
+++ b/epan/dissectors/packet-ncp-sss.c
@@ -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);
}
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index 7403cc51ec..c942ccb4fc 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -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",
diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c
index daec1bbe1e..f79619c13b 100644
--- a/epan/dissectors/packet-ospf.c
+++ b/epan/dissectors/packet-ospf.c
@@ -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),
diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c
index 0bff1f258d..cafb2510b9 100644
--- a/epan/dissectors/packet-pvfs2.c
+++ b/epan/dissectors/packet-pvfs2.c
@@ -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
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index 6ce434e392..ec2a0f14f6 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -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;