From 2e7bf1d7210ee79b93ba9ce4462e22e71097a102 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 9 Mar 2015 11:58:23 +0000 Subject: constify i386-sol2-tdep.c and machoread.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /home/pedro/gdb/mygit/src/gdb/i386-sol2-tdep.c: In function ‘const char* i386_sol2_static_transform_name(const char*)’: /home/pedro/gdb/mygit/src/gdb/i386-sol2-tdep.c:93:29: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] p = strrchr (name, '.'); ^ gdb: 2015-03-20 Pedro Alves * i386-sol2-tdep.c (i386_sol2_static_transform_name): Move "p" to inner block and make it const. * machoread.c (get_archive_prefix_len): Make "lparen" const. --- gdb/i386-sol2-tdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/i386-sol2-tdep.c') diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c index af783df..59f9be7 100644 --- a/gdb/i386-sol2-tdep.c +++ b/gdb/i386-sol2-tdep.c @@ -80,9 +80,10 @@ i386_sol2_mcontext_addr (struct frame_info *this_frame) static const char * i386_sol2_static_transform_name (const char *name) { - char *p; if (name[0] == '.') { + const char *p; + /* For file-local statics there will be a period, a bunch of junk (the contents of which match a string given in the N_OPT), a period and the name. For function-local statics -- cgit v1.1