This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] constify nto-tdep.c
- From: Yao Qi <qiyao at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 20 Mar 2015 17:43:34 -0000
- Subject: [binutils-gdb] constify nto-tdep.c
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c32ed3ef8084f209c8ce2e9e0fecc91560245373
commit c32ed3ef8084f209c8ce2e9e0fecc91560245373
Author: Pedro Alves <palves@redhat.com>
Date: Mon Mar 9 11:58:14 2015 +0000
constify nto-tdep.c
/home/pedro/gdb/mygit/src/gdb/nto-tdep.c: In function â??int nto_find_and_open_solib(char*, unsigned int, char**)â??:
/home/pedro/gdb/mygit/src/gdb/nto-tdep.c:111:14: error: invalid conversion from â??const char*â?? to â??char*â?? [-fpermissive]
endian = gdbarch_byte_order (target_gdbarch ())
^
/home/pedro/gdb/mygit/src/gdb/nto-tdep.c: In function â??void nto_init_solib_absolute_prefix()â??:
/home/pedro/gdb/mygit/src/gdb/nto-tdep.c:170:14: error: invalid conversion from â??const char*â?? to â??char*â?? [-fpermissive]
endian = gdbarch_byte_order (target_gdbarch ())
^
gdb
2015-03-20 Pedro Alves <palves@redhat.com>
* nto-tdep.c (nto_find_and_open_solib): Make "endian" const.
(nto_init_solib_absolute_prefix): Likewise.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/nto-tdep.c | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9d9c287..0e3afc9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2015-03-20 Pedro Alves <palves@redhat.com>
+ * nto-tdep.c (nto_find_and_open_solib): Make "endian" const.
+ (nto_init_solib_absolute_prefix): Likewise.
+
+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.
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 93c230c..ba3c845 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -84,7 +84,8 @@ nto_map_arch_to_cputype (const char *arch)
int
nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
{
- char *buf, *arch_path, *nto_root, *endian;
+ char *buf, *arch_path, *nto_root;
+ const char *endian;
const char *base;
const char *arch;
int arch_len, len, ret;
@@ -147,7 +148,8 @@ void
nto_init_solib_absolute_prefix (void)
{
char buf[PATH_MAX * 2], arch_path[PATH_MAX];
- char *nto_root, *endian;
+ char *nto_root;
+ const char *endian;
const char *arch;
nto_root = nto_target ();