diff options
author | Jörg Mayer <jmayer@loplof.de> | 2005-07-30 01:01:02 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2005-07-30 01:01:02 +0000 |
commit | 5602f5bb833647428967edbc5b1e99bf865646f0 (patch) | |
tree | ed2fe5de1d2a6b127f90d567fa0f4d98d5f4717d /epan/dissectors | |
parent | 29060b1082fcf7afa4652c78df48c70e3cda4d8f (diff) |
Make some funtions static. More char -> const char warning fixes
svn path=/trunk/; revision=15146
Diffstat (limited to 'epan/dissectors')
24 files changed, 154 insertions, 152 deletions
diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c index b9460daf19..063386f110 100644 --- a/epan/dissectors/packet-dcm.c +++ b/epan/dissectors/packet-dcm.c @@ -298,7 +298,7 @@ dcm_init(void) } } -dcmState_t * +static dcmState_t * mkds(void) { dcmState_t *ds; @@ -316,7 +316,7 @@ mkds(void) return ds; } -const char * +static const char * dcm_pdu2str(guint8 item) { const char *s = ""; @@ -340,7 +340,7 @@ dcm_pdu2str(guint8 item) return s; } -const char * +static const char * dcm_result2str(guint8 result) { const char *s = ""; @@ -352,7 +352,7 @@ dcm_result2str(guint8 result) return s; } -const char * +static const char * dcm_source2str(guint8 source) { const char *s = ""; @@ -365,7 +365,7 @@ dcm_source2str(guint8 source) return s; } -const char * +static const char * dcm_reason2str(guint8 source, guint8 reason) { const char *s = ""; @@ -387,7 +387,7 @@ dcm_reason2str(guint8 source, guint8 reason) return s; } -const char * +static const char * dcm_abort2str(guint8 reason) { const char *s = ""; @@ -403,7 +403,7 @@ dcm_abort2str(guint8 reason) return s; } -const char * +static const char * dcm_PCresult2str(guint8 result) { const char *s = ""; @@ -418,7 +418,7 @@ dcm_PCresult2str(guint8 result) return s; } -const char * +static const char * dcm_flags2str(guint8 flags) { const char *s = ""; @@ -432,7 +432,7 @@ dcm_flags2str(guint8 flags) return s; } -const char * +static const char * dcm_cmd2str(guint16 us) { const char *s = ""; @@ -466,7 +466,7 @@ dcm_cmd2str(guint16 us) return s; } -const char * +static const char * dcm_rsp2str(guint16 us) { const char *s = ""; @@ -485,7 +485,7 @@ dcm_rsp2str(guint16 us) return s; } -void +static void dcm_setSyntax(dcmItem_t *di, char *name) { if (NULL == di) return; @@ -513,7 +513,7 @@ dcm_setSyntax(dcmItem_t *di, char *name) di->syntax = DCM_ELE; /* explicit little endian, deflated */ } -char * +static char * dcm_tag2str(guint16 grp, guint16 elm, guint8 syntax, tvbuff_t *tvb, int offset, guint32 len, int vr, int tr) { static char buf[512+1]; /* bad form ??? */ @@ -624,7 +624,7 @@ dcm_get_pdu_len(tvbuff_t *tvb, int offset) return len + 6; /* add in fixed header part */ } -void +static void dissect_dcm_assoc(dcmState_t *dcm_data, proto_item *ti, tvbuff_t *tvb, int offset) { proto_tree *dcm_tree = NULL; @@ -766,7 +766,7 @@ lookupCtx(dcmState_t *dd, guint8 ctx) #define D_LEN4 5 #define D_VALUE 6 -void +static void dissect_dcm_data(dcmState_t *dcm_data, proto_item *ti, tvbuff_t *tvb) { int len, offset, toffset, state, vr, tr; diff --git a/epan/dissectors/packet-dcom-cba-acco.c b/epan/dissectors/packet-dcom-cba-acco.c index a652059619..97e0013f2f 100644 --- a/epan/dissectors/packet-dcom-cba-acco.c +++ b/epan/dissectors/packet-dcom-cba-acco.c @@ -1195,7 +1195,7 @@ dissect_Server_GetProvConnections_resp(tvbuff_t *tvb, int offset, #define CBA_MRSH_VERSION_SRT_WITHOUT_CONSID 0x11 -int +static int dissect_CBA_Connection_Data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { diff --git a/epan/dissectors/packet-dcom.c b/epan/dissectors/packet-dcom.c index 90e658950c..33623ed8c7 100644 --- a/epan/dissectors/packet-dcom.c +++ b/epan/dissectors/packet-dcom.c @@ -474,7 +474,7 @@ static const value_string dcom_vt_bool_vals[] = { /* dissect extension to DCOM "this" and "that" */ -int +static int dissect_dcom_extent(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -857,7 +857,7 @@ dissect_dcom_COMVERSION(tvbuff_t *tvb, int offset, packet_info *pinfo, } -int +static int dissect_dcom_SAFEARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex _U_) { @@ -1183,7 +1183,7 @@ dissect_dcom_append_UUID(tvbuff_t *tvb, int offset, /* get a zero terminated wide character string from tvb */ /* maxlength is including zero termination */ /* XXX: is there a function existing somewhere, already implementing this? */ -int +static int dcom_tvb_get_nwstringz0(tvbuff_t *tvb, gint offset, guint32 maxlength, gchar *pszStr) { guint32 u32Idx; diff --git a/epan/dissectors/packet-dis-fields.c b/epan/dissectors/packet-dis-fields.c index 52e34b7e3a..c0e5c98dc2 100644 --- a/epan/dissectors/packet-dis-fields.c +++ b/epan/dissectors/packet-dis-fields.c @@ -182,7 +182,7 @@ DIS_BitMask DIS_APPEARANCE_LIFEFORM[] = /* Adjust an offset variable for proper alignment for a specified field length. */ -gint alignOffset(gint offset, guint fieldLength) +static gint alignOffset(gint offset, guint fieldLength) { gint remainder = offset % fieldLength; if (remainder != 0) diff --git a/epan/dissectors/packet-dis.c b/epan/dissectors/packet-dis.c index 90a09d4d07..88d2b45904 100644 --- a/epan/dissectors/packet-dis.c +++ b/epan/dissectors/packet-dis.c @@ -59,8 +59,8 @@ static gint ett_dis_payload = -1; static dissector_handle_t dis_dissector_handle; static guint dis_udp_port = DEFAULT_DIS_UDP_PORT; -static char* dis_proto_name = "Distributed Interactive Simulation"; -static char* dis_proto_name_short = "DIS"; +static const char* dis_proto_name = "Distributed Interactive Simulation"; +static const char* dis_proto_name_short = "DIS"; /* Main dissector routine to be invoked for a DIS PDU. */ diff --git a/epan/dissectors/packet-dnp.c b/epan/dissectors/packet-dnp.c index 1e33594703..f0c433b65d 100644 --- a/epan/dissectors/packet-dnp.c +++ b/epan/dissectors/packet-dnp.c @@ -1106,7 +1106,7 @@ dnp3_al_obj_quality(tvbuff_t *tvb, int offset, guint8 al_ptflags, proto_item *t_ /* Final hex no. should be: 0xAABBCCDDEEFF */ /* Epoch time + ms. dd:mm:yyyy hh:mm:ss.iii */ /**********************************************************************/ -char * +static char * dnp3_al_decode_timestamp(tvbuff_t *tvb, int temp_pos, char* buff) { diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index a8915cdf33..12333373e3 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -2237,7 +2237,7 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int dns_data_offset, start_off = cur_off; if (dns_tree) { - char *s = (isupdate ? "Zone" : "Queries"); + const char *s = (isupdate ? "Zone" : "Queries"); ti = proto_tree_add_text(dns_tree, tvb, start_off, -1, s); qatree = proto_item_add_subtree(ti, ett_dns_qry); } @@ -2253,7 +2253,7 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int dns_data_offset, static int dissect_answer_records(tvbuff_t *tvb, int cur_off, int dns_data_offset, - int count, column_info *cinfo, proto_tree *dns_tree, char *name, + int count, column_info *cinfo, proto_tree *dns_tree, const char *name, packet_info *pinfo) { int start_off, add_off; diff --git a/epan/dissectors/packet-edonkey.c b/epan/dissectors/packet-edonkey.c index 03d2ddda97..82c4473b8f 100644 --- a/epan/dissectors/packet-edonkey.c +++ b/epan/dissectors/packet-edonkey.c @@ -239,7 +239,7 @@ static const value_string edonkey_search_conds[] = { /* Dissects a generic eDonkey list */ static int dissect_edonkey_list(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree *tree, - int listnum_length, char* listdesc, + int listnum_length, const char* listdesc, int (*item_dissector)(tvbuff_t *, packet_info *, int, proto_tree *)) { /* <List> ::= <List Size> <Item>* */ @@ -271,7 +271,7 @@ static int dissect_edonkey_list(tvbuff_t *tvb, packet_info *pinfo _U_, return offset; } -gint lookup_str_index(gchar* str, gint length, const value_string *vs) +static gint lookup_str_index(gchar* str, gint length, const value_string *vs) { gint i = 0; diff --git a/epan/dissectors/packet-enc.c b/epan/dissectors/packet-enc.c index 7929084511..4804eb3f3a 100644 --- a/epan/dissectors/packet-enc.c +++ b/epan/dissectors/packet-enc.c @@ -67,7 +67,7 @@ static int hf_enc_flags = -1; static gint ett_enc = -1; -void +static void capture_enc(const guchar *pd, int offset, int len, packet_counts *ld) { struct enchdr ench; diff --git a/epan/dissectors/packet-esis.c b/epan/dissectors/packet-esis.c index 44e5cda45d..793e86bcfb 100644 --- a/epan/dissectors/packet-esis.c +++ b/epan/dissectors/packet-esis.c @@ -139,7 +139,7 @@ static void esis_dissect_redirect_pdu( guint8 len, tvbuff_t *tvb, * void (may modify proto tree) */ static void -esis_dissect_unknown( tvbuff_t *tvb, proto_tree *tree, char *fmat, ...){ +esis_dissect_unknown( tvbuff_t *tvb, proto_tree *tree, const char *fmat, ...){ va_list ap; va_start(ap, fmat); @@ -274,13 +274,13 @@ esis_dissect_redirect_pdu( guint8 len, tvbuff_t *tvb, proto_tree *tree) { static void dissect_esis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { const char *pdu_type_string = NULL; - char *pdu_type_format_string = "PDU Type : %s (R:%s%s%s)"; + const char *pdu_type_format_string = "PDU Type : %s (R:%s%s%s)"; esis_hdr_t ehdr; proto_item *ti; proto_tree *esis_tree = NULL; guint8 variable_len; guint tmp_uint = 0; - char *cksum_status; + const char *cksum_status; if (check_col(pinfo->cinfo, COL_PROTOCOL)) col_set_str(pinfo->cinfo, COL_PROTOCOL, "ESIS"); diff --git a/epan/dissectors/packet-etheric.c b/epan/dissectors/packet-etheric.c index 8642e1ff7f..e651bdca48 100644 --- a/epan/dissectors/packet-etheric.c +++ b/epan/dissectors/packet-etheric.c @@ -289,7 +289,7 @@ static void dissect_etheric_message(tvbuff_t *message_tvb, packet_info *pinfo, p /* ------------------------------------------------------------------ Mapping number to ASCII-character ------------------------------------------------------------------ */ -char number_to_char_2(int number) +static char number_to_char_2(int number) { if (number < 10) return ((char) number + 0x30); @@ -641,7 +641,7 @@ dissect_etheric_backward_call_indicators_parameter(tvbuff_t *parameter_tvb,proto /* ------------------------------------------------------------------ Dissector Message Type release message */ -gint +static gint dissect_etheric_release_message(tvbuff_t *message_tvb, proto_tree *etheric_tree) { proto_item* parameter_item; proto_tree* parameter_tree; @@ -694,7 +694,7 @@ dissect_etheric_unknown_parameter(tvbuff_t *parameter_tvb, proto_item *parameter /* ------------------------------------------------------------------ Dissector Message Type Initial address message */ -gint +static gint dissect_etheric_initial_address_message(tvbuff_t *message_tvb, proto_tree *etheric_tree) { proto_item* parameter_item; proto_tree* parameter_tree; @@ -782,7 +782,7 @@ dissect_etheric_initial_address_message(tvbuff_t *message_tvb, proto_tree *ether /* ------------------------------------------------------------------ Dissector Message Type Address complete */ -gint +static gint dissect_etheric_address_complete_message(tvbuff_t *message_tvb, proto_tree *etheric_tree) { proto_item* parameter_item; proto_tree* parameter_tree; @@ -809,7 +809,7 @@ dissect_etheric_address_complete_message(tvbuff_t *message_tvb, proto_tree *ethe /* ------------------------------------------------------------------ Dissector Message Type Call Progress */ -gint +static gint dissect_etheric_call_progress_message(tvbuff_t *message_tvb, proto_tree *isup_tree) { proto_item* parameter_item; proto_tree* parameter_tree; diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c index 9eb1de0664..31ae210826 100644 --- a/epan/dissectors/packet-fddi.c +++ b/epan/dissectors/packet-fddi.c @@ -187,7 +187,7 @@ capture_fddi(const guchar *pd, int len, packet_counts *ld) } /* capture_fddi */ -static gchar * +static const gchar * fddifc_to_str(int fc) { static gchar strbuf[128+1]; @@ -265,7 +265,7 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, { proto_tree *fh_tree = NULL; proto_item *ti; - gchar *fc_str; + const gchar *fc_str; proto_tree *fc_tree; static guchar src[6], dst[6]; guchar src_swapped[6], dst_swapped[6]; diff --git a/epan/dissectors/packet-gnutella.c b/epan/dissectors/packet-gnutella.c index c0e6c1a092..1c6ccec981 100644 --- a/epan/dissectors/packet-gnutella.c +++ b/epan/dissectors/packet-gnutella.c @@ -351,7 +351,7 @@ static void dissect_gnutella_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree * proto_tree *gnutella_query_tree; guint8 payload_descriptor; guint32 size = 0; - char *payload_descriptor_text; + const char *payload_descriptor_text; if (tree) { ti = proto_tree_add_item(tree, diff --git a/epan/dissectors/packet-gsm_a.c b/epan/dissectors/packet-gsm_a.c index 428cd3931d..d1f230a840 100644 --- a/epan/dissectors/packet-gsm_a.c +++ b/epan/dissectors/packet-gsm_a.c @@ -1514,7 +1514,7 @@ be_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_ guint8 oct; guint32 value; guint32 curr_offset; - gchar *str = NULL; + const gchar *str = NULL; curr_offset = offset; @@ -1824,7 +1824,7 @@ be_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar * guint8 sdi; guint8 num_chan; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -2367,7 +2367,7 @@ be_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_s { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -2600,7 +2600,7 @@ be_chosen_chan(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar { guint8 oct; guint32 curr_offset; - gchar *str = NULL; + const gchar *str = NULL; len = len; curr_offset = offset; @@ -2730,7 +2730,7 @@ be_for_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *ad { guint8 oct; guint32 curr_offset; - gchar *str = NULL; + const gchar *str = NULL; len = len; curr_offset = offset; @@ -2774,7 +2774,7 @@ be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc { guint8 oct; guint32 curr_offset; - gchar *str = NULL; + const gchar *str = NULL; len = len; curr_offset = offset; @@ -2819,7 +2819,7 @@ be_cct_pool(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *a { guint8 oct; guint32 curr_offset; - gchar *str = NULL; + const gchar *str = NULL; len = len; curr_offset = offset; @@ -2863,7 +2863,7 @@ be_curr_chan_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -2970,8 +2970,8 @@ be_speech_ver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar { guint8 oct; guint32 curr_offset; - gchar *str = NULL; - gchar *short_str = NULL; + const gchar *str = NULL; + const gchar *short_str = NULL; len = len; curr_offset = offset; @@ -3671,7 +3671,7 @@ de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch guint8 oct; guint32 value; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -3749,7 +3749,7 @@ de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *ad guint32 curr_offset; proto_tree *subtree; proto_item *item; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -3800,7 +3800,7 @@ de_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_s { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -4993,7 +4993,7 @@ de_network_name(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -5074,7 +5074,7 @@ de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar * { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -5251,7 +5251,7 @@ de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -5295,7 +5295,7 @@ de_aux_states(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -5367,7 +5367,7 @@ de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar guint32 saved_offset; proto_tree *subtree; proto_item *item; - gchar *str; + const gchar *str; #define DE_BC_ITC_SPEECH 0x00 #define DE_BC_ITC_UDI 0x01 @@ -6569,7 +6569,7 @@ de_call_state(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar guint32 curr_offset; proto_tree *subtree; proto_item *item; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -6652,7 +6652,7 @@ de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, guint8 ton; guint8 *poctets; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -6750,7 +6750,7 @@ de_cld_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -6817,7 +6817,7 @@ de_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, guint8 ton; guint8 *poctets; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -6965,7 +6965,7 @@ de_clg_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -7031,7 +7031,7 @@ de_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_ guint8 oct; guint8 cause; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -7611,7 +7611,7 @@ de_prog_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *a { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -7719,7 +7719,7 @@ de_repeat_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -7758,7 +7758,7 @@ de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -7821,7 +7821,7 @@ de_cp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *a { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -7941,7 +7941,7 @@ de_rp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *a { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; curr_offset = offset; @@ -8019,7 +8019,7 @@ de_gmm_attach_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -8055,8 +8055,8 @@ de_gmm_attach_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g guint8 oct; guint8 oct_ciph; guint32 curr_offset; - gchar *str_follow; - gchar *str_attach; + const gchar *str_follow; + const gchar *str_attach; proto_item *tf = NULL; proto_tree *tf_tree = NULL; @@ -8120,7 +8120,7 @@ de_gmm_ciph_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -8161,7 +8161,7 @@ de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -8196,8 +8196,8 @@ de_gmm_detach_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g { guint8 oct; guint32 curr_offset; - gchar *str; - gchar *str_power; + const gchar *str; + const gchar *str_power; proto_item *tf = NULL; proto_tree *tf_tree = NULL; @@ -8312,8 +8312,8 @@ de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch { guint8 oct; guint32 curr_offset; - gchar *str; - gchar str_val[]="00"; + const gchar *str; + gchar str_val[3]; proto_item *tf = NULL; proto_tree *tf_tree = NULL; @@ -8365,9 +8365,11 @@ de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch case 96: str="288"; break; case 97: str="320"; break; case 98: str="352"; break; - default: str=str_val; - str[0]=oct/10+'0'; - str[1]=oct%10+'0'; + default: + str_val[0]=oct/10+'0'; + str_val[1]=oct%10+'0'; + str_val[2]=0; + str=str_val; } proto_tree_add_text(tf_tree, @@ -8396,7 +8398,7 @@ de_gmm_ftostby(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -8430,7 +8432,7 @@ de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -8527,7 +8529,7 @@ de_gmm_ident_type2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -8563,7 +8565,7 @@ de_gmm_imeisv_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -8825,7 +8827,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l guint add_ocetets; /* octets which are covered by one element -1 */ guint curr_bits_length; guchar acc_type; - gchar *str; + const gchar *str; gchar multi_slot_str[64][230] = { "Not specified", /* 00 */ "Max Rx-Slot/TDMA:1 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:2 Tta:3 Ttb:2 Tra:4 Trb:2 Type:1", /* 01 */ @@ -10175,7 +10177,7 @@ de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar * { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -10296,7 +10298,7 @@ de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -10335,8 +10337,8 @@ de_gmm_update_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g guint8 oct; guint8 oct_ciph; guint32 curr_offset; - gchar *str_follow; - gchar *str_update; + const gchar *str_follow; + const gchar *str_update; proto_item *tf = NULL; proto_tree *tf_tree = NULL; @@ -10459,7 +10461,7 @@ de_gmm_service_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, guint8 oct; guint8 oct_ciph; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -10586,7 +10588,7 @@ de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -10621,7 +10623,7 @@ de_gc_timer(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *a guint8 oct; guint16 val; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -10665,7 +10667,7 @@ de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar * guint8 oct; guint16 val; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -10706,7 +10708,7 @@ de_gc_radio_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -10741,7 +10743,7 @@ de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -10998,7 +11000,7 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar { guint32 curr_offset; guint curr_len; - gchar *str; + const gchar *str; guchar oct; guchar oct2; struct e_in6_addr ipv6_addr; @@ -11139,7 +11141,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add guint32 curr_offset; guint curr_len; guchar oct; - gchar *str; + const gchar *str; curr_len = len; curr_offset = offset; @@ -11698,7 +11700,7 @@ de_sm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *a { guint8 oct; guint32 curr_offset; - gchar *str; + const gchar *str; len = len; curr_offset = offset; @@ -11905,7 +11907,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch guchar op_code; guchar pkt_fil_count; guchar e_bit; - gchar *str; + const gchar *str; guchar count; guchar oct; @@ -12571,7 +12573,7 @@ static guint8 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset * Type Length Value (TLV) element dissector */ static guint8 -elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, gchar *name_add) +elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add) { guint8 oct, parm_len; guint8 consumed; @@ -12648,7 +12650,7 @@ elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, gu * is not defined for these. */ static guint8 -elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, gchar *name_add) +elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add) { guint8 oct; guint8 consumed; @@ -12719,7 +12721,7 @@ elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, gui * is not defined for these. */ static guint8 -elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, gchar *name_add) +elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add) { guint8 oct; guint8 consumed; @@ -12786,7 +12788,7 @@ elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int id * Type (T) element dissector */ static guint8 -elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, gchar *name_add) +elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add) { guint8 oct; guint32 curr_offset; @@ -12821,7 +12823,7 @@ elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guin * Length Value (LV) element dissector */ static guint8 -elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len, gchar *name_add) +elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add) { guint8 parm_len; guint8 consumed; @@ -14389,7 +14391,7 @@ dtap_mm_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) guint8 oct; proto_tree *subtree; proto_item *item; - gchar *str; + const gchar *str; curr_offset = offset; curr_len = len; @@ -14488,7 +14490,7 @@ dtap_mm_id_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) guint curr_len; proto_tree *subtree; proto_item *item; - gchar *str; + const gchar *str; curr_offset = offset; curr_len = len; @@ -14645,7 +14647,7 @@ dtap_mm_loc_upd_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) guint8 oct; proto_tree *subtree; proto_item *item; - gchar *str; + const gchar *str; curr_offset = offset; curr_len = len; @@ -15143,7 +15145,7 @@ dtap_cc_congestion_control(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guin guint8 oct; proto_tree *subtree; proto_item *item; - gchar *str; + const gchar *str; curr_offset = offset; curr_len = len; diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c index 4c4712927f..d1cfde99a1 100644 --- a/epan/dissectors/packet-gsm_sms.c +++ b/epan/dissectors/packet-gsm_sms.c @@ -94,8 +94,8 @@ } -static char *gsm_sms_proto_name = "GSM SMS TPDU (GSM 03.40)"; -static char *gsm_sms_proto_name_short = "GSM SMS"; +static const char *gsm_sms_proto_name = "GSM SMS TPDU (GSM 03.40)"; +static const char *gsm_sms_proto_name_short = "GSM SMS"; /* Initialize the subtree pointers */ static gint ett_gsm_sms = -1; @@ -212,12 +212,12 @@ static gint ett_udh_ieis[NUM_UDH_IEIS]; } static void -dis_field_addr(tvbuff_t *tvb, proto_tree *tree, guint32 *offset_p, gchar *title) +dis_field_addr(tvbuff_t *tvb, proto_tree *tree, guint32 *offset_p, const gchar *title) { static gchar digit_table[] = {"0123456789*#abc\0"}; proto_item *item; proto_tree *subtree = NULL; - gchar *str = NULL; + const gchar *str = NULL; guint8 oct; guint32 offset; guint32 numdigocts; @@ -354,7 +354,7 @@ dis_field_pid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 oct) proto_tree *subtree = NULL; guint8 form; guint8 telematic; - gchar *str = NULL; + const gchar *str = NULL; item = @@ -514,7 +514,7 @@ dis_field_dcs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 oct, proto_item *item; proto_tree *subtree = NULL; guint8 form; - gchar *str = NULL; + const gchar *str = NULL; gboolean default_5_bits; gboolean default_3_bits; gboolean default_data; @@ -1107,15 +1107,15 @@ dis_field_dt(tvbuff_t *tvb, proto_tree *tree, guint32 *offset_p) static void dis_field_st(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 oct) { - static gchar *sc_complete = "Short message transaction completed"; - static gchar *sc_temporary = "Temporary error, SC still trying to transfer SM"; - static gchar *sc_perm = "Permanent error, SC is not making any more transfer attempts"; - static gchar *sc_tempfin = "Temporary error, SC is not making any more transfer attempts"; + static const gchar *sc_complete = "Short message transaction completed"; + static const gchar *sc_temporary = "Temporary error, SC still trying to transfer SM"; + static const gchar *sc_perm = "Permanent error, SC is not making any more transfer attempts"; + static const gchar *sc_tempfin = "Temporary error, SC is not making any more transfer attempts"; proto_item *item; proto_tree *subtree = NULL; guint8 value; - gchar *str = NULL; - gchar *str2 = NULL; + const gchar *str = NULL; + const gchar *str2 = NULL; item = @@ -1308,7 +1308,7 @@ dis_field_fcs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 oct) { proto_item *item; proto_tree *subtree = NULL; - gchar *str = NULL; + const gchar *str = NULL; item = @@ -1531,7 +1531,7 @@ gsm_sms_char_ascii_decode(unsigned char* dest, const unsigned char* src, int len static void dis_iei_apa_8bit(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) { - gchar *str = NULL; + const gchar *str = NULL; guint8 oct; @@ -1576,7 +1576,7 @@ dis_iei_apa_8bit(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) static void dis_iei_apa_16bit(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) { - gchar *str = NULL; + const gchar *str = NULL; guint32 value; @@ -1633,7 +1633,7 @@ dis_field_ud_iei(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length) guint8 oct; proto_item *item; proto_tree *subtree = NULL; - gchar *str = NULL; + const gchar *str = NULL; guint8 iei_len; @@ -2129,7 +2129,7 @@ dis_msg_submit(tvbuff_t *tvb, proto_tree *tree, guint32 offset) guint8 oct; guint8 vp_form; guint8 udl; - gchar *str = NULL; + const gchar *str = NULL; gboolean seven_bit; gboolean eight_bit; gboolean ucs2; @@ -2423,7 +2423,7 @@ dis_msg_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset) guint32 length; guint8 oct; guint8 cdl; - gchar *str = NULL; + const gchar *str = NULL; gboolean udhi; diff --git a/epan/dissectors/packet-gsm_ss.c b/epan/dissectors/packet-gsm_ss.c index c40500a906..bd7b61ac07 100644 --- a/epan/dissectors/packet-gsm_ss.c +++ b/epan/dissectors/packet-gsm_ss.c @@ -312,7 +312,7 @@ param_AddressString(ASN1_SCK *asn1, proto_tree *tree, guint len, int hf_field) guint saved_offset; gint32 value; guchar *poctets; - gchar *str = NULL; + const gchar *str = NULL; char bigbuf[1024]; saved_offset = asn1->offset; @@ -389,7 +389,7 @@ param_ssCode(ASN1_SCK *asn1, proto_tree *tree, guint len, int hf_field) { guint saved_offset; gint32 value; - gchar *str = NULL; + const gchar *str = NULL; hf_field = hf_field; @@ -692,7 +692,7 @@ param_bearerservice(ASN1_SCK *asn1, proto_tree *tree, guint len, int hf_field) { guint saved_offset; gint32 value; - gchar *str = NULL; + const gchar *str = NULL; hf_field = hf_field; @@ -771,7 +771,7 @@ param_teleservice(ASN1_SCK *asn1, proto_tree *tree, guint len, int hf_field) { guint saved_offset; gint32 value; - gchar *str = NULL; + const gchar *str = NULL; hf_field = hf_field; @@ -833,7 +833,7 @@ param_ussdDCS(ASN1_SCK *asn1, proto_tree *tree, guint len, int hf_field) { guint saved_offset; gint32 value; - gchar *str = NULL; + const gchar *str = NULL; char bigbuf[1024]; proto_tree *subtree; proto_item *item; @@ -1132,7 +1132,7 @@ param_guidanceInfo(ASN1_SCK *asn1, proto_tree *tree, guint len, int hf_field) { guint saved_offset; gint32 value; - gchar *str = NULL; + const gchar *str = NULL; hf_field = hf_field; @@ -1158,7 +1158,7 @@ param_forwardingOpt(ASN1_SCK *asn1, proto_tree *tree, guint len, int hf_field) guint saved_offset; gint32 value; char bigbuf[1024]; - gchar *str = NULL; + const gchar *str = NULL; hf_field = hf_field; diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index 794cce01cf..d409335bf0 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -1166,10 +1166,10 @@ struct _gtp_hdr { }; static guint8 gtp_version = 0; -static char *yesno[] = { "no", "yes" }; +static const char *yesno[] = { "no", "yes" }; static void -col_append_str_gtp(column_info *cinfo, gint el, gchar *proto_name) { +col_append_str_gtp(column_info *cinfo, gint el, const gchar *proto_name) { int i; int max_len; @@ -2101,7 +2101,7 @@ decode_gtp_ptmsi(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree * /* adjust - how many bytes before offset should be highlighted */ static int -decode_qos_gprs(tvbuff_t *tvb, int offset, proto_tree *tree, gchar* qos_str, guint8 adjust) { +decode_qos_gprs(tvbuff_t *tvb, int offset, proto_tree *tree, const gchar* qos_str, guint8 adjust) { guint8 spare1, delay, reliability, peak, spare2, precedence, spare3, mean; proto_tree *ext_tree_qos; @@ -2909,8 +2909,8 @@ static guint8 wrapped_tvb_get_guint8( tvbuff_t *tvb, int offset, int type) * WARNING :) type does not mean length of length any more... see below for * type = 3! */ -int -decode_qos_umts(tvbuff_t *tvb, int offset, proto_tree *tree, gchar* qos_str, guint8 type) { +static int +decode_qos_umts(tvbuff_t *tvb, int offset, proto_tree *tree, const gchar* qos_str, guint8 type) { guint length; guint8 al_ret_priority; @@ -3129,7 +3129,7 @@ decode_qos_umts(tvbuff_t *tvb, int offset, proto_tree *tree, gchar* qos_str, gui return retval; } -static gchar* dissect_radius_qos_umts(proto_tree *tree, tvbuff_t *tvb) { +static const gchar* dissect_radius_qos_umts(proto_tree *tree, tvbuff_t *tvb) { decode_qos_umts(tvb, 0, tree, "UMTS GTP QoS Profile", 3); return "UMTS GTP QoS Profile"; } diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index 916f7bb84a..e6c29ec986 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -288,7 +288,7 @@ dissect_per_IA5String(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_t /* XXX we dont do >64k length strings yet */ guint32 -dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len, char *alphabet, int alphabet_length, char *info_str, guint32 info_str_len) +dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len, const char *alphabet, int alphabet_length, char *info_str, guint32 info_str_len) { guint32 length; gboolean byte_aligned; @@ -917,7 +917,7 @@ DEBUG_ENTRY("dissect_per_constrained_integer"); 22.8 extension marker == 1 */ guint32 -dissect_per_choice(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, gint ett_index, const per_choice_t *choice, char *name, guint32 *value) +dissect_per_choice(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, gint ett_index, const per_choice_t *choice, const char *name, guint32 *value) { gboolean extension_present, extension_flag; int extension_root_entries; @@ -1067,7 +1067,7 @@ printf("new_offset:%d offset:%d length*8:%d\n",new_offset,offset,length*8); } -static char * +static const char * index_get_optional_name(const per_sequence_t *sequence, int index) { int i; @@ -1083,7 +1083,7 @@ index_get_optional_name(const per_sequence_t *sequence, int index) return "<unknown type>"; } -static char * +static const char * index_get_extension_name(const per_sequence_t *sequence, int index) { int i; diff --git a/epan/dissectors/packet-per.h b/epan/dissectors/packet-per.h index 3752f01e20..4993982489 100644 --- a/epan/dissectors/packet-per.h +++ b/epan/dissectors/packet-per.h @@ -51,13 +51,13 @@ typedef int (*per_callback)(tvbuff_t *, int, packet_info *, proto_tree *); typedef struct _per_choice_t { int value; - char *name; + const char *name; int extension; per_callback func; } per_choice_t; typedef struct _per_sequence_t { - char *name; + const char *name; int extension; int optional; per_callback func; @@ -96,7 +96,7 @@ extern guint32 dissect_per_integer(tvbuff_t *tvb, guint32 offset, packet_info *p extern guint32 dissect_per_constrained_integer(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, guint32 min, guint32 max, guint32 *value, proto_item **item, gboolean has_extension); -extern guint32 dissect_per_choice(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, gint ett_index, const per_choice_t *choice, char *name, guint32 *value); +extern guint32 dissect_per_choice(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, gint ett_index, const per_choice_t *choice, const char *name, guint32 *value); extern guint32 dissect_per_sequence(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *sequence); @@ -104,6 +104,6 @@ extern guint32 dissect_per_octet_string(tvbuff_t *tvb, guint32 offset, packet_in extern guint32 dissect_per_bit_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len); -extern guint32 dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len, char *alphabet, int alphabet_length, char *info_str, guint32 info_str_len); +extern guint32 dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, packet_info *pinfo, proto_tree *tree, int hf_index, int min_len, int max_len, const char *alphabet, int alphabet_length, char *info_str, guint32 info_str_len); #endif /* __PACKET_PER_H__ */ diff --git a/epan/dissectors/packet-radius.h b/epan/dissectors/packet-radius.h index e44cde33b0..2543ae26e0 100644 --- a/epan/dissectors/packet-radius.h +++ b/epan/dissectors/packet-radius.h @@ -32,7 +32,7 @@ typedef struct _radius_vendor_info_t { typedef struct _radius_attr_info_t radius_attr_info_t; typedef void (radius_attr_dissector_t)(radius_attr_info_t*, proto_tree*, packet_info*, tvbuff_t*, int, int, proto_item* ); -typedef gchar* (radius_avp_dissector_t)(proto_tree*,tvbuff_t*); +typedef const gchar* (radius_avp_dissector_t)(proto_tree*,tvbuff_t*); struct _radius_attr_info_t { gchar *name; diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 156cc91ca7..77e33c0e44 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -361,7 +361,7 @@ static GMemChunk *rtcp_conversations = NULL; void rtcp_add_address( packet_info *pinfo, address *addr, int port, int other_port, - gchar *setup_method, guint32 setup_frame_number) + const gchar *setup_method, guint32 setup_frame_number) { address null_addr; conversation_t* p_conv; @@ -1170,7 +1170,7 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree *t "Chunk: %u -- Null Terminator ", count); } else if (( value & 0x8000 )) { - gchar* run_type = (value & 0x4000) ? "1s" : "0s"; + const gchar* run_type = (value & 0x4000) ? "1s" : "0s"; value &= 0x7FFF; proto_tree_add_text(chunks_tree, tvb, offset, 2, "Chunk: %u -- Length Run %s, length: %u", diff --git a/epan/dissectors/packet-rtcp.h b/epan/dissectors/packet-rtcp.h index 3cddf39ae2..5523c4db57 100644 --- a/epan/dissectors/packet-rtcp.h +++ b/epan/dissectors/packet-rtcp.h @@ -56,4 +56,4 @@ struct _rtcp_conversation_info void rtcp_add_address(packet_info *pinfo, address *addr, int port, int other_port, - gchar *setup_method, guint32 setup_frame_number); + const gchar *setup_method, guint32 setup_frame_number); diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index 7666f527da..9098672ef2 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -256,7 +256,7 @@ rtp_free_hash_dyn_payload(GHashTable *rtp_dyn_payload) void rtp_add_address(packet_info *pinfo, address *addr, int port, int other_port, - gchar *setup_method, guint32 setup_frame_number, GHashTable *rtp_dyn_payload) + const gchar *setup_method, guint32 setup_frame_number, GHashTable *rtp_dyn_payload) { address null_addr; conversation_t* p_conv; diff --git a/epan/dissectors/packet-rtp.h b/epan/dissectors/packet-rtp.h index 84dedb0351..cc6133b638 100644 --- a/epan/dissectors/packet-rtp.h +++ b/epan/dissectors/packet-rtp.h @@ -65,7 +65,7 @@ struct _rtp_conversation_info void rtp_add_address(packet_info *pinfo, address *addr, int port, int other_port, - gchar *setup_method, + const gchar *setup_method, guint32 setup_frame_number, GHashTable *rtp_dyn_payload); |