From 85a464c98012ebad9a612dbd76b4662442f1821b Mon Sep 17 00:00:00 2001 From: Stephen Fisher Date: Wed, 28 Mar 2007 07:06:39 +0000 Subject: [PATCH] Fix a bunch of warnings, add svn:keywords Id and svn:eol-style native to packet-iuup.c. svn path=/trunk/; revision=21244 --- epan/dissectors/packet-bittorrent.c | 4 +- epan/dissectors/packet-smb.c | 111 ++++++++++++++-------------- epan/dissectors/packet-smb2.c | 2 +- epan/dissectors/packet-smtp.c | 8 +- epan/dissectors/packet-sna.c | 2 +- epan/dissectors/packet-wsp.c | 4 +- epan/dissectors/packet-ymsg.c | 2 +- 7 files changed, 66 insertions(+), 67 deletions(-) diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c index a299a0792f..f4d67158e9 100644 --- a/epan/dissectors/packet-bittorrent.c +++ b/epan/dissectors/packet-bittorrent.c @@ -710,8 +710,8 @@ static void dissect_bittorrent_welcome (tvbuff_t *tvb, packet_info *pinfo _U_, p /* The version number is 4 numeric characters for the client ids beginning with '-' and 3 characters for the rest. */ - version = tvb_get_string(tvb, offset + strlen(peer_id[i].id), - (guint8*)(peer_id[i].id[0] == '-') ? 4 : 3); + version = (char*)tvb_get_string(tvb, offset + strlen(peer_id[i].id), + (peer_id[i].id[0] == '-') ? 4 : 3); proto_tree_add_text(tree, tvb, offset, 20, "Client is %s v%s", peer_id[i].name, format_text((guchar*)version, (peer_id[i].id[0] == '-') ? 4 : 3)); diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index ef29d466e5..65ebf68afe 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -2082,7 +2082,7 @@ dissect_negprot_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /*Dialect Name */ CHECK_BYTE_COUNT(len); proto_tree_add_string(dtr, hf_smb_dialect_name, tvb, offset, - len, str); + len, (char*)str); COUNT_BYTES(len); } @@ -2429,7 +2429,7 @@ dissect_old_dir_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Directory: %s", - format_text(dn, strlen(dn))); + format_text(dn, strlen((guchar*)dn))); } END_OF_SMB @@ -2534,7 +2534,7 @@ dissect_tree_connect_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(an, strlen(an))); + format_text(an, strlen((guchar*)an))); } /* buffer format */ @@ -2813,12 +2813,12 @@ dissect_move_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of if (fn == NULL) goto endofcommand; proto_tree_add_string_format(tree, hf_smb_file_name, tvb, offset, - fn_len, fn, "Old File Name: %s", format_text(fn, strlen(fn))); + fn_len, fn, "Old File Name: %s", format_text(fn, strlen((guchar*)fn))); COUNT_BYTES(fn_len); if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } /* buffer format */ @@ -2832,12 +2832,12 @@ dissect_move_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of if (fn == NULL) goto endofcommand; proto_tree_add_string_format(tree, hf_smb_file_name, tvb, offset, - fn_len, fn, "New File Name: %s", format_text(fn, strlen(fn))); + fn_len, fn, "New File Name: %s", format_text(fn, strlen((guchar*)fn))); COUNT_BYTES(fn_len); if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -2882,12 +2882,12 @@ dissect_copy_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of if (fn == NULL) goto endofcommand; proto_tree_add_string_format(tree, hf_smb_file_name, tvb, offset, - fn_len, fn, "Source File Name: %s", format_text(fn, strlen(fn))); + fn_len, fn, "Source File Name: %s", format_text(fn, strlen((guchar*)fn))); COUNT_BYTES(fn_len); if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Source Name: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } /* buffer format */ @@ -2902,12 +2902,11 @@ dissect_copy_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of goto endofcommand; proto_tree_add_string_format(tree, hf_smb_file_name, tvb, offset, fn_len, fn, "Destination File Name: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); COUNT_BYTES(fn_len); if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, ", Destination Name: %s", - format_text(fn, strlen(fn))); + col_append_fstr(pinfo->cinfo, COL_INFO, ", Destination Name: %s", format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -2990,7 +2989,7 @@ dissect_open_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -3254,7 +3253,7 @@ dissect_create_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -3319,7 +3318,7 @@ dissect_delete_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -3361,7 +3360,7 @@ dissect_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } /* buffer format */ @@ -3380,7 +3379,7 @@ dissect_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -3428,7 +3427,7 @@ dissect_nt_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } /* buffer format */ @@ -3447,7 +3446,7 @@ dissect_nt_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -3487,7 +3486,7 @@ dissect_query_information_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -3565,7 +3564,7 @@ dissect_set_information_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -3934,7 +3933,7 @@ dissect_create_temporary_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree * if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -4778,7 +4777,7 @@ dissect_search_find_request(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } /* buffer format */ @@ -5396,7 +5395,7 @@ dissect_open_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -6319,8 +6318,8 @@ dissect_session_setup_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree else col_append_fstr(pinfo->cinfo, COL_INFO, "%s\\%s", - format_text(dn, strlen(dn)), - format_text(an, strlen(an))); + format_text(dn, strlen((guchar*)dn)), + format_text(an, strlen((guchar*)an))); } /* OS */ @@ -6657,7 +6656,7 @@ dissect_tree_connect_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(an, strlen(an))); + format_text(an, strlen((guchar*)an))); } /* @@ -6670,7 +6669,7 @@ dissect_tree_connect_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* XXX - what if this runs past bc? */ an_len = tvb_strsize(tvb, offset); CHECK_BYTE_COUNT(an_len); - an = tvb_get_ptr(tvb, offset, an_len); + an = (char*)tvb_get_ptr(tvb, offset, an_len); proto_tree_add_string(tree, hf_smb_service, tvb, offset, an_len, an); COUNT_BYTES(an_len); @@ -6770,7 +6769,7 @@ dissect_tree_connect_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* XXX - what if this runs past bc? */ an_len = tvb_strsize(tvb, offset); CHECK_BYTE_COUNT(an_len); - an = tvb_get_ptr(tvb, offset, an_len); + an = (char*)tvb_get_ptr(tvb, offset, an_len); proto_tree_add_string(tree, hf_smb_service, tvb, offset, an_len, an); COUNT_BYTES(an_len); @@ -7910,7 +7909,7 @@ dissect_nt_trans_param_request(tvbuff_t *tvb, packet_info *pinfo, int offset, pr bc -= 1; /* file name */ - fn = get_unicode_or_ascii_string(tvb, &offset, si->unicode, &fn_len, TRUE, TRUE, &bc); + fn = (char*)get_unicode_or_ascii_string(tvb, &offset, si->unicode, &fn_len, TRUE, TRUE, &bc); if (fn != NULL) { proto_tree_add_string(tree, hf_smb_file_name, tvb, offset, fn_len, fn); @@ -8508,7 +8507,7 @@ dissect_nt_trans_param_response(tvbuff_t *tvb, packet_info *pinfo, if(len<0)break; /* file name */ - fn = get_unicode_or_ascii_string(tvb, &offset, si->unicode, &fn_len, TRUE, TRUE, &bc); + fn = (char*)get_unicode_or_ascii_string(tvb, &offset, si->unicode, &fn_len, TRUE, TRUE, &bc); if (fn == NULL) break; proto_tree_add_string(tree, hf_smb_file_name, tvb, offset, fn_len, @@ -9349,7 +9348,7 @@ dissect_nt_create_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } END_OF_SMB @@ -9979,7 +9978,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } break; case 0x01: /*TRANS2_FIND_FIRST2*/ @@ -10020,7 +10019,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Pattern: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } break; @@ -10062,7 +10061,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Continue: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } break; @@ -10111,7 +10110,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } break; @@ -10138,7 +10137,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } break; @@ -10268,7 +10267,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } break; @@ -10302,7 +10301,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", Dir: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } break; case 0x0e: /*TRANS2_SESSION_SETUP*/ @@ -10323,7 +10322,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } break; @@ -10337,7 +10336,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } break; @@ -10846,7 +10845,7 @@ dissect_4_2_16_2(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /* EA name */ name = tvb_get_ephemeral_string(tvb, offset, name_len); - proto_item_append_text(item, ": %s", format_text(name, strlen(name))); + proto_item_append_text(item, ": %s", format_text(name, strlen((guchar*)name))); CHECK_BYTE_COUNT_SUBR(name_len + 1); proto_tree_add_item( @@ -11159,7 +11158,7 @@ dissect_qfi_SMB_FILE_ALL_INFO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /* file name */ CHECK_BYTE_COUNT_SUBR(fn_len); - fn = get_unicode_or_ascii_string(tvb, &offset, si->unicode, &fn_len, TRUE, TRUE, bcp); + fn = (char*)get_unicode_or_ascii_string(tvb, &offset, si->unicode, &fn_len, TRUE, TRUE, bcp); if (fn != NULL) { proto_tree_add_string(tree, hf_smb_file_name, tvb, offset, fn_len, fn); @@ -11230,7 +11229,7 @@ dissect_qfi_SMB_FILE_STREAM_INFO(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr fn); COUNT_BYTES_SUBR(fn_len); - proto_item_append_text(item, ": %s", format_text(fn, strlen(fn))); + proto_item_append_text(item, ": %s", format_text(fn, strlen((guchar*)fn))); proto_item_set_len(item, offset-old_offset); if (neo == 0) @@ -12596,10 +12595,10 @@ dissect_4_3_4_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, " %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } - proto_item_append_text(item, " File: %s", format_text(fn, strlen(fn))); + proto_item_append_text(item, " File: %s", format_text(fn, strlen((guchar*)fn))); proto_item_set_len(item, offset-old_offset); *trunc = FALSE; @@ -12702,10 +12701,10 @@ dissect_4_3_4_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, " %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } - proto_item_append_text(item, " File: %s", format_text(fn, strlen(fn))); + proto_item_append_text(item, " File: %s", format_text(fn, strlen((guchar*)fn))); proto_item_set_len(item, offset-old_offset); *trunc = FALSE; @@ -12786,7 +12785,7 @@ dissect_4_3_4_4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, " %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } /* skip to next structure */ @@ -12804,7 +12803,7 @@ dissect_4_3_4_4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, } } - proto_item_append_text(item, " File: %s", format_text(fn, strlen(fn))); + proto_item_append_text(item, " File: %s", format_text(fn, strlen((guchar*)fn))); proto_item_set_len(item, offset-old_offset); *trunc = FALSE; @@ -12891,7 +12890,7 @@ dissect_4_3_4_5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, " %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } /* skip to next structure */ @@ -12909,7 +12908,7 @@ dissect_4_3_4_5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, } } - proto_item_append_text(item, " File: %s", format_text(fn, strlen(fn))); + proto_item_append_text(item, " File: %s", format_text(fn, strlen((guchar*)fn))); proto_item_set_len(item, offset-old_offset); *trunc = FALSE; @@ -13022,7 +13021,7 @@ dissect_4_3_4_6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, " %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } /* skip to next structure */ @@ -13040,7 +13039,7 @@ dissect_4_3_4_6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, } } - proto_item_append_text(item, " File: %s", format_text(fn, strlen(fn))); + proto_item_append_text(item, " File: %s", format_text(fn, strlen((guchar*)fn))); proto_item_set_len(item, offset-old_offset); *trunc = FALSE; @@ -13101,7 +13100,7 @@ dissect_4_3_4_7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, " %s", - format_text(fn, strlen(fn))); + format_text(fn, strlen((guchar*)fn))); } /* skip to next structure */ @@ -13119,7 +13118,7 @@ dissect_4_3_4_7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, } } - proto_item_append_text(item, " File: %s", format_text(fn, strlen(fn))); + proto_item_append_text(item, " File: %s", format_text(fn, strlen((guchar*)fn))); proto_item_set_len(item, offset-old_offset); *trunc = FALSE; diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index 5dbdc4556d..f1ac5454da 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -1711,7 +1711,7 @@ static void dissect_smb2_secblob(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, smb2_info_t *si _U_) { if( (tvb_length(tvb)>=7) - && (!tvb_memeql(tvb, 0, "NTLMSSP", 7))){ + && (!tvb_memeql(tvb, 0, (guint8*)"NTLMSSP", 7))){ call_dissector(ntlmssp_handle, tvb, pinfo, tree); } else { call_dissector(gssapi_handle, tvb, pinfo, tree); diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c index fe3f05ee35..ddc7126c87 100644 --- a/epan/dissectors/packet-smtp.c +++ b/epan/dissectors/packet-smtp.c @@ -262,7 +262,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (linelen >= 4 && ISALPHA(line[0]) && ISALPHA(line[1]) && ISALPHA(line[2]) && ISALPHA(line[3]) && (linelen == 4 || line[4] == ' ')) { - if (strncasecmp(line, "DATA", 4) == 0) { + if (strncasecmp((char*)line, "DATA", 4) == 0) { /* * DATA command. @@ -281,9 +281,9 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } else { - if ((linelen >= 7) && line[0] == 'X' && ( (strncasecmp(line, "X-EXPS ", 7) == 0) || - ((linelen >=13) && (strncasecmp(line, "X-LINK2STATE ", 13) == 0)) || - ((linelen >= 8) && (strncasecmp(line, "XEXCH50 ", 8) == 0)) )) + if ((linelen >= 7) && line[0] == 'X' && ( (strncasecmp((char*)line, "X-EXPS ", 7) == 0) || + ((linelen >=13) && (strncasecmp((char*)line, "X-LINK2STATE ", 13) == 0)) || + ((linelen >= 8) && (strncasecmp((char*)line, "XEXCH50 ", 8) == 0)) )) frame_data->pdu_type = SMTP_PDU_CMD; else /* diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c index 8835870694..a89a1c79be 100644 --- a/epan/dissectors/packet-sna.c +++ b/epan/dissectors/packet-sna.c @@ -2424,7 +2424,7 @@ dissect_control_0e(tvbuff_t *tvb, proto_tree *tree) buf = tvb_get_ephemeral_string(tvb, 3, len); EBCDIC_to_ASCII(buf, len); - proto_tree_add_string(tree, hf_sna_control_0e_value, tvb, 3, len, buf); + proto_tree_add_string(tree, hf_sna_control_0e_value, tvb, 3, len, (char*)buf); } static void diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c index 15c07a204d..9bdfa61bfc 100644 --- a/epan/dissectors/packet-wsp.c +++ b/epan/dissectors/packet-wsp.c @@ -5910,7 +5910,7 @@ add_post_variable (proto_tree *tree, tvbuff_t *tvb, guint variableStart, guint v char *variableBuffer; char *valueBuffer; - variableBuffer = tvb_get_ephemeral_string(tvb, variableStart, variableLength); + variableBuffer = (char*)tvb_get_ephemeral_string(tvb, variableStart, variableLength); if (valueEnd < valueStart) { @@ -5923,7 +5923,7 @@ add_post_variable (proto_tree *tree, tvbuff_t *tvb, guint variableStart, guint v valueLength = valueEnd-valueStart; /* XXX - if this throws an exception, "variableBuffer" is leaked */ - valueBuffer = tvb_get_ephemeral_string(tvb, valueStart, valueLength); + valueBuffer = (char*)tvb_get_ephemeral_string(tvb, valueStart, valueLength); } /* Check for variables with no value */ diff --git a/epan/dissectors/packet-ymsg.c b/epan/dissectors/packet-ymsg.c index 1c2420b926..4005508aca 100644 --- a/epan/dissectors/packet-ymsg.c +++ b/epan/dissectors/packet-ymsg.c @@ -337,7 +337,7 @@ static gboolean dissect_ymsg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - if (tvb_memeql(tvb, 0, "YMSG", 4) == -1) { + if (tvb_memeql(tvb, 0, (guint8*)"YMSG", 4) == -1) { /* Not a Yahoo Messenger packet. */ return FALSE; }