This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 6/9] constify xcoffread.c
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 20 Mar 2015 16:56:37 +0000
- Subject: [PATCH 6/9] constify xcoffread.c
- Authentication-results: sourceware.org; auth=none
- References: <1426870600-17876-1-git-send-email-qiyaoltc at gmail dot com>
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(-)
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 3cb6eda..9571ac8 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! */
--
1.9.1