diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-06-17 23:19:08 +0200 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-06-17 23:19:09 +0200 |
commit | ae3e2ccfe75e5c62749c15ead5c95e052aad21ca (patch) | |
tree | 285b0955af4e4f9fb8554eee200039da0f78818d /gdb | |
parent | 8465943af6a6f756c3d4b077eb1081ade927b26b (diff) | |
download | gdb-ae3e2ccfe75e5c62749c15ead5c95e052aad21ca.zip gdb-ae3e2ccfe75e5c62749c15ead5c95e052aad21ca.tar.gz gdb-ae3e2ccfe75e5c62749c15ead5c95e052aad21ca.tar.bz2 |
linux-low: Remove usage of "register" keyword
AFAIK, the register keyword is not relevant today, and clang complains
about it:
/home/emaisin/src/binutils-gdb/gdb/gdbserver/linux-low.c:5873:3: error: 'register' storage class specifier is deprecated and incompatible with C++1z
[-Werror,-Wdeprecated-register]
register PTRACE_XFER_TYPE *buffer;
^~~~~~~~~
I think we can safely remove it.
gdb/gdbserver/ChangeLog:
* linux-low.c (linux_read_memory, linux_write_memory): Remove
usage of "register" keyword.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 16 |
2 files changed, 13 insertions, 8 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index a90a562..c190fce 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,10 @@ 2017-06-17 Simon Marchi <simon.marchi@ericsson.com> + * linux-low.c (linux_read_memory, linux_write_memory): Remove + usage of "register" keyword. + +2017-06-17 Simon Marchi <simon.marchi@ericsson.com> + * configure: Re-generate. 2017-06-17 Simon Marchi <simon.marchi@ericsson.com> diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 7fbf744..c8e8d08 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -5870,11 +5870,11 @@ static int linux_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) { int pid = lwpid_of (current_thread); - register PTRACE_XFER_TYPE *buffer; - register CORE_ADDR addr; - register int count; + PTRACE_XFER_TYPE *buffer; + CORE_ADDR addr; + int count; char filename[64]; - register int i; + int i; int ret; int fd; @@ -5958,16 +5958,16 @@ linux_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) static int linux_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len) { - register int i; + int i; /* Round starting address down to longword boundary. */ - register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE); + CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE); /* Round ending address up; get number of longwords that makes. */ - register int count + int count = (((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1) / sizeof (PTRACE_XFER_TYPE); /* Allocate buffer of that many longwords. */ - register PTRACE_XFER_TYPE *buffer = XALLOCAVEC (PTRACE_XFER_TYPE, count); + PTRACE_XFER_TYPE *buffer = XALLOCAVEC (PTRACE_XFER_TYPE, count); int pid = lwpid_of (current_thread); |