diff options
author | Pedro Alves <palves@redhat.com> | 2015-03-09 11:58:17 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-03-20 17:38:50 +0000 |
commit | 53e780858180511b194438c87d2f3a1c68804f06 (patch) | |
tree | ad5bbbe02454a0eee012e00e0c60b734f45715cc /gdb | |
parent | bc23328cc108d8805f1d234b86e5a6b76d4a80d5 (diff) | |
download | gdb-53e780858180511b194438c87d2f3a1c68804f06.zip gdb-53e780858180511b194438c87d2f3a1c68804f06.tar.gz gdb-53e780858180511b194438c87d2f3a1c68804f06.tar.bz2 |
constify sparc-sol2-tdep.c and spu-tdep.c
/home/pedro/gdb/mygit/src/gdb/sparc-sol2-tdep.c: In function ‘const char* sparc_sol2_static_transform_name(const char*)’:
/home/pedro/gdb/mygit/src/gdb/sparc-sol2-tdep.c:247:35: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
char *p = strrchr (name, '.');
^
gdb:
2015-03-20 Pedro Alves <palves@redhat.com>
* sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Make "p" const.
* spu-tdep.c (spu_gdbarch_init): Make "name" const.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/sparc-sol2-tdep.c | 2 | ||||
-rw-r--r-- | gdb/spu-tdep.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7ad050c..9d9c287 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-03-20 Pedro Alves <palves@redhat.com> + + * sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Make "p" const. + * spu-tdep.c (spu_gdbarch_init): Make "name" const. + 2015-03-20 Jan Kratochvil <jan.kratochvil@redhat.com> * config/djgpp/README: Remove gdb.hp. diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c index 1aabe76..5afe308 100644 --- a/gdb/sparc-sol2-tdep.c +++ b/gdb/sparc-sol2-tdep.c @@ -244,7 +244,7 @@ sparc_sol2_static_transform_name (const char *name) if (name[0] == '$') { - char *p = strrchr (name, '.'); + const char *p = strrchr (name, '.'); if (p) return p + 1; } diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 36ad312..6ccb679 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -2698,7 +2698,7 @@ spu_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) This assumes the filename convention employed by solib-spu.c. */ else if (info.abfd) { - char *name = strrchr (info.abfd->filename, '@'); + const char *name = strrchr (info.abfd->filename, '@'); if (name) sscanf (name, "@0x%*x <%d>", &id); } |