This is the mail archive of the gdb-cvs@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]

[binutils-gdb] Remove const in xtensa-linux-nat.c:fetch_gregs


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d274ecf4ddf76768af57e27f654b9ce6784b391c

commit d274ecf4ddf76768af57e27f654b9ce6784b391c
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Mon Mar 6 16:06:42 2017 -0500

    Remove const in xtensa-linux-nat.c:fetch_gregs
    
    Fixes:
    
    /home/emaisin/src/binutils-gdb/gdb/xtensa-linux-nat.c: In function 'void fetch_gregs(regcache*, ptid_t, int)':
    /home/emaisin/src/binutils-gdb/gdb/xtensa-linux-nat.c:178:23: error: uninitialized const 'regs' [-fpermissive]
       const gdb_gregset_t regs;
                           ^
    
    gdb/ChangeLog:
    
    	* xtensa-linux-nat.c (fetch_gregs): Remove const.

Diff:
---
 gdb/ChangeLog          | 4 ++++
 gdb/xtensa-linux-nat.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ccca5bf..ddfc94f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* xtensa-linux-nat.c (fetch_gregs): Remove const.
+
 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* remote.c (remote_add_target_side_commands): Use range-based
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index afe15f6..c29f0c7 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -175,7 +175,7 @@ static void
 fetch_gregs (struct regcache *regcache, int regnum)
 {
   int tid = ptid_get_lwp (inferior_ptid);
-  const gdb_gregset_t regs;
+  gdb_gregset_t regs;
   int areg;
   
   if (ptrace (PTRACE_GETREGS, tid, 0, (long) &regs) < 0)


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