diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2007-03-23 00:51:21 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2007-03-23 00:51:21 +0000 |
commit | 411249419dc399c8fcf5a364a90067f864626ba1 (patch) | |
tree | 23c9ef4abb163a722dd20f5f081c3611e8569b48 | |
parent | 2e562ea7b4fcae053bf48939baaaea2baef55588 (diff) | |
download | wireshark-411249419dc399c8fcf5a364a90067f864626ba1.tar.gz |
fix some more warnings (type casts)
svn path=/trunk/; revision=21141
-rw-r--r-- | epan/dissectors/packet-rtcp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-scsi.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-sctp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-smb-pipe.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-smb2.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-tcp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-tipc.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-vnc.c | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index a7df8cbd17..2431ae90a9 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -2145,8 +2145,8 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo, if (p_conv_data->last_received_ts == lsr) { /* Look at time of since original packet was sent */ - gint seconds_between_packets = - pinfo->fd->abs_ts.secs - p_conv_data->last_received_timestamp.secs; + gint seconds_between_packets = (gint) + (pinfo->fd->abs_ts.secs - p_conv_data->last_received_timestamp.secs); gint nseconds_between_packets = pinfo->fd->abs_ts.nsecs - p_conv_data->last_received_timestamp.nsecs; diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c index 842695a2ac..6fb9cbf573 100644 --- a/epan/dissectors/packet-scsi.c +++ b/epan/dissectors/packet-scsi.c @@ -4551,7 +4551,7 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, old_proto=pinfo->current_proto; pinfo->current_proto="SCSI"; - opcode = cdata->itlq->scsi_opcode; + opcode = (guint8) cdata->itlq->scsi_opcode; devtype = cdata->itl->cmdset&SCSI_CMDSET_MASK; if (tree) { diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index 0f8912990c..3506e0a45b 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -590,7 +590,7 @@ make_address_key(guint32 spt, guint32 dpt, address *addr) k[0].length = 1; k[0].key = ep_memdup(&spt,sizeof(spt)); k[1].length = 1; k[1].key = ep_memdup(&dpt,sizeof(dpt)); - k[2].length = 1; k[2].key = &(addr->type); + k[2].length = 1; k[2].key = (guint32*)&(addr->type); k[3].length = 1; k[3].key = (guint32*)&(addr->len); k[4].length = ((addr->len/4)+1); diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c index 2894453b95..1ab047d209 100644 --- a/epan/dissectors/packet-smb-pipe.c +++ b/epan/dissectors/packet-smb-pipe.c @@ -510,7 +510,7 @@ add_reltime(tvbuff_t *tvb, int offset, int count _U_, packet_info *pinfo _U_, nstime.nsecs = 0; proto_tree_add_time_format(tree, hf_index, tvb, offset, 4, &nstime, "%s: %s", proto_registrar_get_name(hf_index), - time_secs_to_str(nstime.secs)); + time_secs_to_str( (gint32) nstime.secs)); offset += 4; return offset; } diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index b7ad7f94ff..7d279c6b3f 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -343,7 +343,7 @@ smb2_saved_info_hash_unmatched(gconstpointer k) smb2_saved_info_t *key = (smb2_saved_info_t *)k; guint32 hash; - hash=key->seqnum&0xffffffff; + hash=(guint32) (key->seqnum&0xffffffff); return hash; } @@ -364,7 +364,7 @@ smb2_saved_info_hash_matched(gconstpointer k) smb2_saved_info_t *key = (smb2_saved_info_t *)k; guint32 hash; - hash=key->seqnum&0xffffffff; + hash=(guint32) (key->seqnum&0xffffffff); return hash; } @@ -1723,7 +1723,7 @@ static int dissect_smb2_session_setup_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, smb2_info_t *si) { offset_length_buffer_t s_olb; - ntlmssp_header_t *ntlmssph; + const ntlmssp_header_t *ntlmssph; static int ntlmssp_tap_id = 0; int idx; diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 61fa57688c..3efa142ab1 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -718,7 +718,7 @@ finished_fwd: * duplicate ack * then this is a fast retransmission */ - t=(pinfo->fd->abs_ts.secs-tcpd->rev->lastacktime.secs)*1000000000; + t=(guint32) (pinfo->fd->abs_ts.secs-tcpd->rev->lastacktime.secs)*1000000000; t=t+(pinfo->fd->abs_ts.nsecs)-tcpd->rev->lastacktime.nsecs; if( tcpd->rev->dupacknum>=2 && tcpd->rev->lastack==seq @@ -734,7 +734,7 @@ finished_fwd: * seen sequence number, then it is an OUT-OF-ORDER segment. * (3ms is an arbitrary number) */ - t=(pinfo->fd->abs_ts.secs-tcpd->fwd->nextseqtime.secs)*1000000000; + t=(guint32) (pinfo->fd->abs_ts.secs-tcpd->fwd->nextseqtime.secs)*1000000000; t=t+(pinfo->fd->abs_ts.nsecs)-tcpd->fwd->nextseqtime.nsecs; if( t<3000000 ){ if(!tcpd->ta){ diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c index 2c93a99097..5a8e4e1485 100644 --- a/epan/dissectors/packet-tipc.c +++ b/epan/dissectors/packet-tipc.c @@ -1254,7 +1254,7 @@ dissect_tipc_v2(tvbuff_t *tipc_tvb, proto_tree *tipc_tree, int offset, guint8 us offset = offset + (opt_p << 2); } /* TIPCv2 data */ - if ( msg_size > (orig_hdr_size<<2)) + if ( msg_size > (guint8) (orig_hdr_size<<2)) proto_tree_add_text(tipc_tree, tipc_tvb, offset, -1,"TIPCv2 data: %u bytes", (msg_size - (orig_hdr_size<<2))); } diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c index 8abd9e7864..f49c0fc858 100644 --- a/epan/dissectors/packet-vnc.c +++ b/epan/dissectors/packet-vnc.c @@ -1453,7 +1453,7 @@ vnc_cursor_encoding(tvbuff_t *tvb, packet_info *pinfo, gint *offset, length, FALSE); *offset += length; - length = floor((width + 7)/8) * height; + length = (guint) (floor((width + 7)/8) * height); proto_tree_add_item(tree, hf_vnc_cursor_encoding_bitmask, tvb, *offset, length, FALSE); *offset += length; |