diff options
author | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-12-17 23:35:29 +0000 |
---|---|---|
committer | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-12-17 23:35:29 +0000 |
commit | b886ff9755ee458bf214c0e68382a47791b500a1 (patch) | |
tree | 3c1841cfc3cd95ebf2e74a94096daebeac920343 | |
parent | 9649edc5849fef871a3f54d564bd435958ecbb3d (diff) |
removed some more MSVC warnings (type casting)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9332 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | packet-bssap.c | 4 | ||||
-rw-r--r-- | packet-cpha.c | 6 | ||||
-rw-r--r-- | packet-fc.c | 4 | ||||
-rw-r--r-- | packet-fcsb3.c | 4 | ||||
-rw-r--r-- | packet-gsm_a.c | 12 | ||||
-rw-r--r-- | packet-null.c | 6 | ||||
-rw-r--r-- | packet-sccp.c | 44 | ||||
-rw-r--r-- | packet-scsi.c | 4 | ||||
-rw-r--r-- | packet-smb-pipe.c | 14 | ||||
-rw-r--r-- | packet-smb.c | 28 |
10 files changed, 63 insertions, 63 deletions
diff --git a/packet-bssap.c b/packet-bssap.c index 4320e1156e..eea716542a 100644 --- a/packet-bssap.c +++ b/packet-bssap.c @@ -7,7 +7,7 @@ * Copyright 2003, Michael Lum <mlum [AT] telostech.com> * In association with Telos Technology Inc. * - * $Id: packet-bssap.c,v 1.7 2003/12/13 01:57:27 guy Exp $ + * $Id: packet-bssap.c,v 1.8 2003/12/17 23:35:28 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -271,7 +271,7 @@ dissect_bssap_var_parameter(tvbuff_t *tvb, packet_info *pinfo, offset += length_length; dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree, parameter_type, - offset, parameter_length); + (guint8) offset, parameter_length); return(parameter_length + length_length); } diff --git a/packet-cpha.c b/packet-cpha.c index 0e199bd022..939f3f7902 100644 --- a/packet-cpha.c +++ b/packet-cpha.c @@ -2,7 +2,7 @@ * Routines for the Check Point High-Availability Protocol (CPHAP) * Copyright 2002, Yaniv Kaul <ykaul-at-netvision.net.il> * - * $Id: packet-cpha.c,v 1.7 2003/06/03 02:21:08 gerald Exp $ + * $Id: packet-cpha.c,v 1.8 2003/12/17 23:35:28 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -187,7 +187,7 @@ static void dissect_conf_reply(tvbuff_t *, int, proto_tree *); int is_report_ifs(guint16); static const char *report_code2str(guint16); static const char *ha_mode2str(guint16); -static const char *status2str(guint16); +static const char *status2str(guint32); static const char *state2str(guint8); static int @@ -474,7 +474,7 @@ ha_mode2str(guint16 hamode) { } static const char * -status2str(guint16 status) { +status2str(guint32 status) { if(status <= NUM_STATUS) return status_str[status]; return status_str[0]; diff --git a/packet-fc.c b/packet-fc.c index 6e24b37747..620c174d0d 100644 --- a/packet-fc.c +++ b/packet-fc.c @@ -4,7 +4,7 @@ * Copyright 2003 Ronnie Sahlberg, exchange first/last matching and * tap listener and misc updates * - * $Id: packet-fc.c,v 1.16 2003/10/30 02:06:11 guy Exp $ + * $Id: packet-fc.c,v 1.17 2003/12/17 23:35:28 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1045,7 +1045,7 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint_format (fc_tree, hf_fc_type, tvb, offset+8, FC_TYPE_SIZE, fchdr.type,"Type: 0x%x(%s)", fchdr.type, - fclctl_get_typestr (fchdr.r_ctl & 0x0F, + fclctl_get_typestr ((guint8) (fchdr.r_ctl & 0x0F), fchdr.type)); } else { proto_tree_add_item (fc_tree, hf_fc_type, tvb, offset+8, 1, FALSE); diff --git a/packet-fcsb3.c b/packet-fcsb3.c index fb5cd161c2..fe407b6754 100644 --- a/packet-fcsb3.c +++ b/packet-fcsb3.c @@ -3,7 +3,7 @@ * This decoder is for FC-SB3 version 1.4 * Copyright 2003, Dinesh G Dutt <ddutt@cisco.com> * - * $Id: packet-fcsb3.c,v 1.1 2003/10/30 02:06:12 guy Exp $ + * $Id: packet-fcsb3.c,v 1.2 2003/12/17 23:35:28 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -644,7 +644,7 @@ static void dissect_fc_sbccs_dib_ctl_hdr (tvbuff_t *tvb, packet_info *pinfo, tvb_get_ntoh24 (tvb, offset+1), "Control Parameter: 0x%x(%s)", tvb_get_ntoh24 (tvb, offset+1), - get_sel_rst_param_string (ctlfn, + get_sel_rst_param_string ((guint8) ctlfn, buffer)); break; case FC_SBCCS_CTL_FN_DEV_XCP: diff --git a/packet-gsm_a.c b/packet-gsm_a.c index af88783646..342ea852d9 100644 --- a/packet-gsm_a.c +++ b/packet-gsm_a.c @@ -38,7 +38,7 @@ * Formats and coding * (3GPP TS 24.080 version 4.3.0 Release 4) * - * $Id: packet-gsm_a.c,v 1.8 2003/12/09 18:49:30 guy Exp $ + * $Id: packet-gsm_a.c,v 1.9 2003/12/17 23:35:28 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -6863,7 +6863,7 @@ elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset) #define ELEM_MAND_TLV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \ {\ - if ((consumed = elem_tlv(tvb, tree, EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0) \ + if ((consumed = elem_tlv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0) \ { \ curr_offset += consumed; \ curr_len -= consumed; \ @@ -6884,7 +6884,7 @@ elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset) #define ELEM_OPT_TLV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \ {\ - if ((consumed = elem_tlv(tvb, tree, EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \ + if ((consumed = elem_tlv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \ { \ curr_offset += consumed; \ curr_len -= consumed; \ @@ -6894,7 +6894,7 @@ elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset) #define ELEM_MAND_TV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \ {\ - if ((consumed = elem_tv(tvb, tree, EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, EMT_elem_name_addition)) > 0) \ + if ((consumed = elem_tv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, EMT_elem_name_addition)) > 0) \ { \ curr_offset += consumed; \ curr_len -= consumed; \ @@ -6915,7 +6915,7 @@ elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset) #define ELEM_OPT_TV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \ {\ - if ((consumed = elem_tv(tvb, tree, EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \ + if ((consumed = elem_tv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \ { \ curr_offset += consumed; \ curr_len -= consumed; \ @@ -6935,7 +6935,7 @@ elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset) #define ELEM_OPT_T(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \ {\ - if ((consumed = elem_t(tvb, tree, EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \ + if ((consumed = elem_t(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, EOT_elem_name_addition)) > 0) \ { \ curr_offset += consumed; \ curr_len -= consumed; \ diff --git a/packet-null.c b/packet-null.c index 03572c7600..1cf359869b 100644 --- a/packet-null.c +++ b/packet-null.c @@ -1,7 +1,7 @@ /* packet-null.c * Routines for null packet disassembly * - * $Id: packet-null.c,v 1.62 2003/11/14 10:11:11 guy Exp $ + * $Id: packet-null.c,v 1.63 2003/12/17 23:35:29 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -321,7 +321,7 @@ capture_null( const guchar *pd, int len, packet_counts *ld ) * BSD derivatives have different values?). */ if (null_header > IEEE_802_3_MAX_LEN) - capture_ethertype(null_header, pd, 4, len, ld); + capture_ethertype((guint16) null_header, pd, 4, len, ld); else { switch (null_header) { @@ -424,7 +424,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) fh_tree = proto_item_add_subtree(ti, ett_null); } else fh_tree = NULL; - ethertype(null_header, tvb, 4, pinfo, tree, fh_tree, hf_null_etype, -1, + ethertype((guint16) null_header, tvb, 4, pinfo, tree, fh_tree, hf_null_etype, -1, 0); } else { /* populate a tree in the second pane with the status of the link diff --git a/packet-sccp.c b/packet-sccp.c index 8ef0b8d5dd..12e81b1fe3 100644 --- a/packet-sccp.c +++ b/packet-sccp.c @@ -8,7 +8,7 @@ * * Copyright 2002, Jeff Morriss <jeff.morriss[AT]ulticom.com> * - * $Id: packet-sccp.c,v 1.17 2003/12/08 21:36:53 guy Exp $ + * $Id: packet-sccp.c,v 1.18 2003/12/17 23:35:29 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -831,7 +831,7 @@ dissect_sccp_global_title(tvbuff_t *tvb, proto_tree *tree, guint8 length, /* Decode address signal(s) */ signals_tvb = tvb_new_subset(tvb, offset, (length - offset), (length - offset)); - dissect_sccp_gt_address_information(signals_tvb, gt_tree, (length - offset), + dissect_sccp_gt_address_information(signals_tvb, gt_tree, (guint8) (length - offset), even, called); } @@ -1005,7 +1005,7 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, if (gti != AI_GTI_NO_GT) { gt_tvb = tvb_new_subset(tvb, offset, (length - offset), (length - offset)); - dissect_sccp_global_title(gt_tvb, call_tree, (length - offset), gti, + dissect_sccp_global_title(gt_tvb, call_tree, (guint8) (length - offset), gti, called); } @@ -1057,7 +1057,7 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, if (gti != AI_GTI_NO_GT) { gt_tvb = tvb_new_subset(tvb, offset, (length - offset), (length - offset)); - dissect_sccp_global_title(gt_tvb, call_tree, (length - offset), gti, + dissect_sccp_global_title(gt_tvb, call_tree, (guint8) (length - offset), gti, called); } @@ -1347,62 +1347,62 @@ dissect_sccp_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, break; case PARAMETER_DESTINATION_LOCAL_REFERENCE: - dissect_sccp_dlr_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_dlr_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_SOURCE_LOCAL_REFERENCE: - dissect_sccp_slr_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_slr_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_CALLED_PARTY_ADDRESS: - dissect_sccp_called_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_called_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_CALLING_PARTY_ADDRESS: - dissect_sccp_calling_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_calling_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_CLASS: - dissect_sccp_class_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_class_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_SEGMENTING_REASSEMBLING: dissect_sccp_segmenting_reassembling_param(parameter_tvb, sccp_tree, - parameter_length); + (guint8) parameter_length); break; case PARAMETER_RECEIVE_SEQUENCE_NUMBER: dissect_sccp_receive_sequence_number_param(parameter_tvb, sccp_tree, - parameter_length); + (guint8) parameter_length); break; case PARAMETER_SEQUENCING_SEGMENTING: dissect_sccp_sequencing_segmenting_param(parameter_tvb, sccp_tree, - parameter_length); + (guint8) parameter_length); break; case PARAMETER_CREDIT: - dissect_sccp_credit_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_credit_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_RELEASE_CAUSE: - dissect_sccp_release_cause_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_release_cause_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_RETURN_CAUSE: - dissect_sccp_return_cause_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_return_cause_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_RESET_CAUSE: - dissect_sccp_reset_cause_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_reset_cause_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_ERROR_CAUSE: - dissect_sccp_error_cause_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_error_cause_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_REFUSAL_CAUSE: - dissect_sccp_refusal_cause_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_refusal_cause_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_DATA: @@ -1416,16 +1416,16 @@ dissect_sccp_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, break; case PARAMETER_SEGMENTATION: - dissect_sccp_segmentation_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_segmentation_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_HOP_COUNTER: - dissect_sccp_hop_counter_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_hop_counter_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; case PARAMETER_IMPORTANCE: if (mtp3_standard != ANSI_STANDARD) - dissect_sccp_importance_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_importance_param(parameter_tvb, sccp_tree, (guint8) parameter_length); else dissect_sccp_unknown_param(parameter_tvb, sccp_tree, parameter_type, parameter_length); @@ -1444,7 +1444,7 @@ dissect_sccp_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, dissect_sccp_unknown_param(parameter_tvb, sccp_tree, parameter_type, parameter_length); else - dissect_sccp_isni_param(parameter_tvb, sccp_tree, parameter_length); + dissect_sccp_isni_param(parameter_tvb, sccp_tree, (guint8) parameter_length); break; default: diff --git a/packet-scsi.c b/packet-scsi.c index 501783c3e2..7aa825219e 100644 --- a/packet-scsi.c +++ b/packet-scsi.c @@ -2,7 +2,7 @@ * Routines for decoding SCSI CDBs and responses * Author: Dinesh G Dutt (ddutt@cisco.com) * - * $Id: packet-scsi.c,v 1.35 2003/10/28 17:27:56 guy Exp $ + * $Id: packet-scsi.c,v 1.36 2003/12/17 23:35:29 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -2450,7 +2450,7 @@ dissect_scsi_modepage (tvbuff_t *tvb, packet_info *pinfo, } if (!(*dissect_modepage)(tvb, pinfo, tree, offset, - pcode & SCSI_MS_PCODE_BITS)) { + (guint8) (pcode & SCSI_MS_PCODE_BITS))) { proto_tree_add_text (tree, tvb, offset+2, plen, "Unknown Page"); } diff --git a/packet-smb-pipe.c b/packet-smb-pipe.c index 3062ce6db4..6a5f365d82 100644 --- a/packet-smb-pipe.c +++ b/packet-smb-pipe.c @@ -8,7 +8,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets * significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and * Guy Harris 2001 * - * $Id: packet-smb-pipe.c,v 1.97 2003/11/16 23:17:22 guy Exp $ + * $Id: packet-smb-pipe.c,v 1.98 2003/12/17 23:35:29 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -3575,7 +3575,7 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb, * It's a FID. */ fid = tvb_get_letohs(s_tvb, 2); - add_fid(s_tvb, pinfo, pipe_tree, offset, 2, fid); + add_fid(s_tvb, pinfo, pipe_tree, offset, 2, (guint16) fid); if (tri != NULL) tri->fid = fid; break; @@ -3609,7 +3609,7 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb, } fid = tri->fid; if (fid != -1) - add_fid(NULL, pinfo, pipe_tree, 0, 0, fid); + add_fid(NULL, pinfo, pipe_tree, 0, 0, (guint16) fid); } else { function = -1; fid = -1; @@ -3788,8 +3788,8 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb, return FALSE; offset = dissect_file_data(d_tvb, pipe_tree, 0, - tvb_reported_length(d_tvb), - tvb_reported_length(d_tvb)); + (guint16) tvb_reported_length(d_tvb), + (guint16) tvb_reported_length(d_tvb)); } break; @@ -3800,8 +3800,8 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb, return FALSE; offset = dissect_file_data(d_tvb, pipe_tree, - offset, tvb_reported_length(d_tvb), - tvb_reported_length(d_tvb)); + offset, (guint16) tvb_reported_length(d_tvb), + (guint16) tvb_reported_length(d_tvb)); } else { if (p_tvb == NULL) return FALSE; diff --git a/packet-smb.c b/packet-smb.c index 5a865eb4cc..161da9e358 100644 --- a/packet-smb.c +++ b/packet-smb.c @@ -3,7 +3,7 @@ * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com> * 2001 Rewrite by Ronnie Sahlberg and Guy Harris * - * $Id: packet-smb.c,v 1.377 2003/12/03 08:43:59 sahlberg Exp $ + * $Id: packet-smb.c,v 1.378 2003/12/17 23:35:29 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -3333,7 +3333,7 @@ dissect_read_file_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre /* fid */ fid = tvb_get_letohs(tvb, offset); - add_fid(tvb, pinfo, tree, offset, 2, fid); + add_fid(tvb, pinfo, tree, offset, 2, (guint16) fid); offset += 2; if (!pinfo->fd->flags.visited) { /* remember the FID for the processing of the response */ @@ -3464,7 +3464,7 @@ dissect_read_file_response(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr /* first check if we have seen the request */ if(si->sip != NULL && si->sip->frame_req>0){ fid=(int)si->sip->extra_info; - add_fid(tvb, pinfo, tree, 0, 0, fid); + add_fid(tvb, pinfo, tree, 0, 0, (guint16) fid); } BYTE_COUNT; @@ -3482,7 +3482,7 @@ dissect_read_file_response(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr /* file data, might be DCERPC on a pipe */ if(bc){ offset = dissect_file_data_maybe_dcerpc(tvb, pinfo, tree, - top_tree, offset, bc, bc, 0, fid); + top_tree, offset, bc, bc, 0, (guint16) fid); bc = 0; } @@ -5294,7 +5294,7 @@ dissect_read_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i /* fid */ fid = tvb_get_letohs(tvb, offset); - add_fid(tvb, pinfo, tree, offset, 2, fid); + add_fid(tvb, pinfo, tree, offset, 2, (guint16) fid); offset += 2; if (!pinfo->fd->flags.visited) { /* remember the FID for the processing of the response */ @@ -5410,7 +5410,7 @@ dissect_read_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* first check if we have seen the request */ if(si->sip != NULL && si->sip->frame_req>0){ fid=(int)si->sip->extra_info; - add_fid(tvb, pinfo, tree, 0, 0, fid); + add_fid(tvb, pinfo, tree, 0, 0, (guint16) fid); } /* remaining */ @@ -5464,7 +5464,7 @@ dissect_read_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* file data, might be DCERPC on a pipe */ if(bc){ offset = dissect_file_data_maybe_dcerpc(tvb, pinfo, tree, - top_tree, offset, bc, datalen, 0, fid); + top_tree, offset, bc, (guint16) datalen, 0, (guint16) fid); bc = 0; } @@ -5509,7 +5509,7 @@ dissect_write_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* fid */ fid = tvb_get_letohs(tvb, offset); - add_fid(tvb, pinfo, tree, offset, 2, fid); + add_fid(tvb, pinfo, tree, offset, 2, (guint16) fid); offset += 2; if (!pinfo->fd->flags.visited) { /* remember the FID for the processing of the response */ @@ -5585,7 +5585,7 @@ dissect_write_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* file data, might be DCERPC on a pipe */ if (bc != 0) { offset = dissect_file_data_maybe_dcerpc(tvb, pinfo, tree, - top_tree, offset, bc, datalen, 0, fid); + top_tree, offset, bc, (guint16) datalen, 0, (guint16) fid); bc = 0; } @@ -5629,7 +5629,7 @@ dissect_write_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, si = (smb_info_t *)pinfo->private_data; /* first check if we have seen the request */ if(si->sip != NULL && si->sip->frame_req>0){ - add_fid(tvb, pinfo, tree, 0, 0, (int)si->sip->extra_info); + add_fid(tvb, pinfo, tree, 0, 0, (guint16) si->sip->extra_info); } /* write count low */ @@ -8960,7 +8960,7 @@ dissect_nt_transaction_response(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre if(pd_tvb){ /* we have reassembled data, grab param and data from there */ dissect_nt_trans_param_response(pd_tvb, pinfo, 0, tree, tp, - &ntd, tvb_length(pd_tvb)); + &ntd, (guint16) tvb_length(pd_tvb)); dissect_nt_trans_data_response(pd_tvb, pinfo, tp, tree, td, &ntd); } else { /* we do not have reassembled data, just use what we have in the @@ -9082,7 +9082,7 @@ dissect_write_print_file_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr COUNT_BYTES(2); /* file data */ - offset = dissect_file_data(tvb, tree, offset, cnt, cnt); + offset = dissect_file_data(tvb, tree, offset, (guint16) cnt, (guint16) cnt); END_OF_SMB @@ -16629,7 +16629,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } /* smb command */ - proto_tree_add_uint_format(htree, hf_smb_cmd, tvb, offset, 1, si->cmd, "SMB Command: %s (0x%02x)", decode_smb_name(si->cmd), si->cmd); + proto_tree_add_uint_format(htree, hf_smb_cmd, tvb, offset, 1, si->cmd, "SMB Command: %s (0x%02x)", decode_smb_name((unsigned char) si->cmd), si->cmd); offset += 1; if(flags2 & 0x4000){ @@ -16767,7 +16767,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) the tap listener called even if there is an exception. */ tap_queue_packet(smb_tap, pinfo, si); - dissect_smb_command(tvb, pinfo, offset, tree, si->cmd, TRUE); + dissect_smb_command(tvb, pinfo, offset, tree, (guint8) si->cmd, TRUE); /* Append error info from this packet to info string. */ if (!si->request && check_col(pinfo->cinfo, COL_INFO)) { |