diff options
author | Jörg Mayer <jmayer@loplof.de> | 2005-08-05 13:10:58 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2005-08-05 13:10:58 +0000 |
commit | 2b2506f0f6375a8294461d55e117a183f95ae3a8 (patch) | |
tree | 9fabf7e9c531695bf37844742f4b476e93750b8f /epan | |
parent | ab8601b7fe82bfd5117fc7bfefb6adb5e7c2c615 (diff) |
More char -> const char warning fixes
svn path=/trunk/; revision=15222
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ber.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ber.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-tcp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-telnet.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-tr.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-trmac.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-user_encap.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-vines.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-windows-common.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-x25.c | 12 |
10 files changed, 26 insertions, 24 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index f1177a4f2a..7a5bffb5a6 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -355,7 +355,7 @@ int dissect_unknown_ber(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tre int -call_ber_oid_callback(char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) +call_ber_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) { tvbuff_t *next_tvb; diff --git a/epan/dissectors/packet-ber.h b/epan/dissectors/packet-ber.h index 2580fb2504..df898605b7 100644 --- a/epan/dissectors/packet-ber.h +++ b/epan/dissectors/packet-ber.h @@ -165,7 +165,7 @@ extern int dissect_ber_bitstring32(gboolean implicit_tag, packet_info *pinfo, pr extern proto_item *ber_last_created_item; extern proto_item *get_ber_last_created_item(void); -int call_ber_oid_callback(char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree); +int call_ber_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree); void register_ber_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto, const char *name); void register_ber_oid_dissector(const char *oid, dissector_t dissector, int proto, const char *name); void register_ber_oid_name(const char *oid, const char *name); diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 57e254fc89..c5240017ad 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -2744,7 +2744,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item *ti = NULL, *tf; int offset = 0; gchar flags[64] = "<None>"; - gchar *fstr[] = {"FIN", "SYN", "RST", "PSH", "ACK", "URG", "ECN", "CWR" }; + const gchar *fstr[] = {"FIN", "SYN", "RST", "PSH", "ACK", "URG", "ECN", "CWR" }; gint fpos = 0, i; guint bpos; guint optlen; diff --git a/epan/dissectors/packet-telnet.c b/epan/dissectors/packet-telnet.c index 53c4dad07a..5933765f22 100644 --- a/epan/dissectors/packet-telnet.c +++ b/epan/dissectors/packet-telnet.c @@ -123,7 +123,7 @@ typedef enum { /* Member of table of IP or TCP options. */ typedef struct tn_opt { - char *name; /* name of option */ + const char *name; /* name of option */ gint *subtree_index; /* pointer to subtree index for option */ tn_opt_len_type len_type; /* type of option length field */ int optlen; /* value length should be (minimum if VARIABLE) */ @@ -1280,7 +1280,7 @@ telnet_sub_option(packet_info *pinfo, proto_tree *telnet_tree, tvbuff_t *tvb, in static int telnet_will_wont_do_dont(proto_tree *telnet_tree, tvbuff_t *tvb, - int start_offset, char *type) + int start_offset, const char *type) { int offset = start_offset; guint8 opt_byte; diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c index 34f55a7353..57cecd4669 100644 --- a/epan/dissectors/packet-tr.c +++ b/epan/dissectors/packet-tr.c @@ -347,7 +347,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) int x; /* Token-Ring Strings */ - char *fc[] = { "MAC", "LLC", "Reserved", "Unknown" }; + const char *fc[] = { "MAC", "LLC", "Reserved", "Unknown" }; trh_current++; diff --git a/epan/dissectors/packet-trmac.c b/epan/dissectors/packet-trmac.c index c2b5f07aa9..91616dd202 100644 --- a/epan/dissectors/packet-trmac.c +++ b/epan/dissectors/packet-trmac.c @@ -103,9 +103,11 @@ sv_text(tvbuff_t *tvb, int svoff, proto_tree *tree) int sv_length = tvb_get_guint8(tvb, svoff+0); guint16 beacon_type, ring; - char *beacon[] = {"Recovery mode set", "Signal loss error", + const char *beacon[] = { + "Recovery mode set", "Signal loss error", "Streaming signal not Claim Token MAC frame", - "Streaming signal, Claim Token MAC frame"}; + "Streaming signal, Claim Token MAC frame" + }; proto_tree *sv_tree; proto_item *ti; diff --git a/epan/dissectors/packet-user_encap.c b/epan/dissectors/packet-user_encap.c index 468f50c028..c5569a7048 100644 --- a/epan/dissectors/packet-user_encap.c +++ b/epan/dissectors/packet-user_encap.c @@ -41,9 +41,9 @@ typedef struct _user_encap_t { guint wtap_encap; guint last_encap; - gchar* name; - gchar* abbr; - gchar* long_name; + const gchar* name; + const gchar* abbr; + const gchar* long_name; const gchar* payload; const gchar* header; diff --git a/epan/dissectors/packet-vines.c b/epan/dissectors/packet-vines.c index 4a59017bf8..ca843360f9 100644 --- a/epan/dissectors/packet-vines.c +++ b/epan/dissectors/packet-vines.c @@ -1026,11 +1026,11 @@ static const value_string vines_rtp_info_type_vals[] = { }; static void rtp_show_machine_type(proto_tree *tree, tvbuff_t *tvb, int offset, - char *tag); + const char *tag); static void rtp_show_flags(proto_tree *tree, tvbuff_t *tvb, int offset, - char *tag); + const char *tag); static int srtp_show_machine_info(proto_tree *tree, tvbuff_t *tvb, int offset, - char *tag); + const char *tag); static int rtp_show_gateway_info(proto_tree *tree, tvbuff_t *tvb, int offset, guint8 link_addr_length, guint8 source_route_length); @@ -1404,7 +1404,7 @@ dissect_vines_rtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static void -rtp_show_machine_type(proto_tree *tree, tvbuff_t *tvb, int offset, char *tag) +rtp_show_machine_type(proto_tree *tree, tvbuff_t *tvb, int offset, const char *tag) { guint8 machine_type; proto_item *ti; @@ -1432,7 +1432,7 @@ rtp_show_machine_type(proto_tree *tree, tvbuff_t *tvb, int offset, char *tag) } static void -rtp_show_flags(proto_tree *tree, tvbuff_t *tvb, int offset, char *tag) +rtp_show_flags(proto_tree *tree, tvbuff_t *tvb, int offset, const char *tag) { guint8 flags; proto_item *ti; @@ -1461,7 +1461,7 @@ rtp_show_flags(proto_tree *tree, tvbuff_t *tvb, int offset, char *tag) } static int -srtp_show_machine_info(proto_tree *tree, tvbuff_t *tvb, int offset, char *tag) +srtp_show_machine_info(proto_tree *tree, tvbuff_t *tvb, int offset, const char *tag) { guint16 metric; guint8 node_type; diff --git a/epan/dissectors/packet-windows-common.c b/epan/dissectors/packet-windows-common.c index f6db30a1ba..8bd49ff225 100644 --- a/epan/dissectors/packet-windows-common.c +++ b/epan/dissectors/packet-windows-common.c @@ -1705,7 +1705,7 @@ dissect_nt_v2_ace_flags(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_item *item = NULL; proto_tree *tree = NULL; guint8 mask; - char *sep = " "; + const char *sep = " "; mask = tvb_get_guint8(tvb, offset); diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c index 4d4db4f9ca..76fe9515a6 100644 --- a/epan/dissectors/packet-x25.c +++ b/epan/dissectors/packet-x25.c @@ -269,7 +269,7 @@ x25_hash_add_proto_end(guint16 vc, guint32 frame) close_circuit(circuit, frame); } -static char *clear_code(unsigned char code) +static const char *clear_code(unsigned char code) { static char buffer[25]; @@ -307,7 +307,7 @@ static char *clear_code(unsigned char code) return buffer; } -static char *clear_diag(unsigned char code) +static const char *clear_diag(unsigned char code) { static char buffer[25]; @@ -534,7 +534,7 @@ static char *clear_diag(unsigned char code) return buffer; } -static char *reset_code(unsigned char code) +static const char *reset_code(unsigned char code) { static char buffer[25]; @@ -562,7 +562,7 @@ static char *reset_code(unsigned char code) return buffer; } -static char *restart_code(unsigned char code) +static const char *restart_code(unsigned char code) { static char buffer[25]; @@ -582,7 +582,7 @@ static char *restart_code(unsigned char code) return buffer; } -static char *registration_code(unsigned char code) +static const char *registration_code(unsigned char code) { static char buffer[25]; @@ -1482,7 +1482,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean toa; /* TOA/NPI address format */ guint16 bytes0_1; guint8 pkt_type; - char *short_name = NULL, *long_name = NULL; + const char *short_name = NULL, *long_name = NULL; tvbuff_t *next_tvb = NULL; gboolean q_bit_set = FALSE; gboolean m_bit_set; |