constify nto-tdep.c
authorPedro Alves <palves@redhat.com>
Mon, 9 Mar 2015 11:58:14 +0000 (11:58 +0000)
committerYao Qi <yao.qi@linaro.org>
Fri, 20 Mar 2015 17:39:03 +0000 (17:39 +0000)
/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.

gdb/ChangeLog
gdb/nto-tdep.c

index 9d9c287889ed63469a5c782447f520db4e58908d..0e3afc9dcedf1feec31bd095dca512ba3076fc33 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 93c230cede7d02e88ba41b766d2ebbf5d5abf26b..ba3c845c3c8c14119d31fb9c43e0bc7431205fbf 100644 (file)
@@ -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 ();