aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-10-13 19:40:50 +0100
committerPedro Alves <palves@redhat.com>2015-10-13 19:40:50 +0100
commite6a959d68b8181c816851dcfc91ae0b2b9296df3 (patch)
treebbe8d57fee50ed86f34304a0f6e85c525607f075 /gdb/symtab.c
parent170742de5dd5be2156f938e00e2451526ef57d5c (diff)
downloadgdb-e6a959d68b8181c816851dcfc91ae0b2b9296df3.zip
gdb-e6a959d68b8181c816851dcfc91ae0b2b9296df3.tar.gz
gdb-e6a959d68b8181c816851dcfc91ae0b2b9296df3.tar.bz2
More char constification
Trivial constifications flagged by G++. E.g.: src/gdb/c-varobj.c: In function ‘void c_describe_child(const varobj*, int, char**, value**, type**, char**)’: src/gdb/c-varobj.c:373:33: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] char *join = was_ptr ? "->" : "."; ^ gdb/ChangeLog: 2015-10-13 Pedro Alves <palves@redhat.com> * ada-lang.c (ada_enum_name): Constify local. * ada-typeprint.c (print_range_bound): Constify locals. * c-varobj.c (c_describe_child): Likewise. * cli/cli-setshow.c (do_set_command): Likewise. * gdb_vecs.c (delim_string_to_char_ptr_vec_append): Likewise. * dwarf2read.c (find_file_and_directory): Likewise. (anonymous_struct_prefix, dwarf2_name): Likewise. * gnu-v3-abi.c (gnuv3_rtti_type): Likewise. * go-lang.c (unpack_mangled_go_symbol): Likewise. * jv-typeprint.c (java_type_print_base): Likewise. * ser-tcp.c (net_open): Likewise. * symfile.c (deduce_language_from_filename): Likewise. * symtab.c (gdb_mangle_name): Likewise. * tui/tui-io.c (tui_redisplay_readline): Likewise.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index c95b651..b0a16b6 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -515,8 +515,8 @@ gdb_mangle_name (struct type *type, int method_id, int signature_id)
int is_constructor;
int is_destructor = is_destructor_name (physname);
/* Need a new type prefix. */
- char *const_prefix = method->is_const ? "C" : "";
- char *volatile_prefix = method->is_volatile ? "V" : "";
+ const char *const_prefix = method->is_const ? "C" : "";
+ const char *volatile_prefix = method->is_volatile ? "V" : "";
char buf[20];
int len = (newname == NULL ? 0 : strlen (newname));