This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[pushed] xtensa-xtregs: Constify field
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>
- Date: Sun, 29 Oct 2017 01:13:58 -0400
- Subject: [pushed] xtensa-xtregs: Constify field
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Fix:
In file included from /home/emaisin/src/binutils-gdb/gdb/xtensa-linux-nat.c:46:0:
/home/emaisin/src/binutils-gdb/gdb/xtensa-xtregs.c:37:1: error: ISO C++ forbids converting a string constant to 'char*' [-Werror=write-strings]
};
^
gdb/ChangeLog:
* xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
---
gdb/ChangeLog | 4 ++++
gdb/xtensa-xtregs.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4583a78..d278841 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
+
+ * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
+
2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
PR python/21213
diff --git a/gdb/xtensa-xtregs.c b/gdb/xtensa-xtregs.c
index 97f7f62..0d2808d 100644
--- a/gdb/xtensa-xtregs.c
+++ b/gdb/xtensa-xtregs.c
@@ -25,7 +25,7 @@ typedef struct {
int size;
int coproc;
int dbnum;
- char* name
+ const char* name
;} xtensa_regtable_t;
#define XTENSA_ELF_XTREG_SIZE 4
--
2.7.4