This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 6/9] constify xcoffread.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]