From: Pedro Alves Date: Mon, 9 Mar 2015 11:58:20 +0000 (+0000) Subject: constify xcoffread.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e28566f7d022e672bc7032d4951112359ad66d77;p=binutils-gdb.git constify xcoffread.c /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 * xcoffread.c (scan_xcoff_symtab): Make "p" and "q" const. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b71739e8156..c1d19a829aa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-03-20 Pedro Alves + + * xcoffread.c (scan_xcoff_symtab): Make "p" and "q" const. + 2015-03-20 Pedro Alves * remote-m32r-sdi.c (m32r_open): Make "port_str" const. diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 3cb6eda3053..9571ac8f554 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -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! */