diff options
author | Pedro Alves <palves@redhat.com> | 2015-10-13 19:40:50 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-10-13 19:40:50 +0100 |
commit | e6a959d68b8181c816851dcfc91ae0b2b9296df3 (patch) | |
tree | bbe8d57fee50ed86f34304a0f6e85c525607f075 /gdb/dwarf2read.c | |
parent | 170742de5dd5be2156f938e00e2451526ef57d5c (diff) | |
download | gdb-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/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index ddd4a4c..0c45d29 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -9074,7 +9074,7 @@ find_file_and_directory (struct die_info *die, struct dwarf2_cu *cu, { /* Irix 6.2 native cc prepends <machine>.: to the compilation directory, get rid of it. */ - char *cp = strchr (*comp_dir, ':'); + const char *cp = strchr (*comp_dir, ':'); if (cp && cp != *comp_dir && cp[-1] == '.' && cp[1] == '/') *comp_dir = cp + 1; @@ -19239,7 +19239,7 @@ static char * anonymous_struct_prefix (struct die_info *die, struct dwarf2_cu *cu) { struct attribute *attr; - char *base; + const char *base; if (die->tag != DW_TAG_class_type && die->tag != DW_TAG_interface_type && die->tag != DW_TAG_structure_type && die->tag != DW_TAG_union_type) @@ -19621,7 +19621,7 @@ dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) if (demangled) { - char *base; + const char *base; /* FIXME: we already did this for the partial symbol... */ DW_STRING (attr) |