[6/9] constify xcoffread.c
Commit Message
From: Pedro Alves <palves@redhat.com>
/home/pedro/gdb/mygit/src/gdb/xcoffread.c: In function ‘void scan_xcoff_symtab(objfile*)’:
/home/pedro/gdb/mygit/src/gdb/xcoffread.c:2644:33: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
p = strchr (namestring, ':');
^
gdb:
2015-03-20 Pedro Alves <palves@redhat.com>
* xcoffread.c (scan_xcoff_symtab): Make "p" and "q" const.
---
gdb/xcoffread.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -2636,7 +2636,7 @@ scan_xcoff_symtab (struct objfile *objfile)
case C_DECL:
case C_STSYM:
{
- char *p;
+ const char *p;
swap_sym (&symbol, &main_aux[0], &namestring, &sraw_symbol,
&ssymnum, objfile);
@@ -2763,7 +2763,7 @@ scan_xcoff_symtab (struct objfile *objfile)
Accept either. */
while (*p && *p != ';' && *p != ',')
{
- char *q;
+ const char *q;
/* Check for and handle cretinous dbx symbol name
continuation! */