diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-07-24 22:46:48 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-07-24 22:46:48 +0000 |
commit | cdd476f8690254fd8e3dda07fabc16e21ada4e5e (patch) | |
tree | acbe856db0019fd3034aabd864d079ad0b46aab4 /gdb/findvar.c | |
parent | d2e8b699d0c4f7793b49d35bf64f537c1bbd714a (diff) | |
download | gdb-cdd476f8690254fd8e3dda07fabc16e21ada4e5e.tar.gz |
2002-07-24 Andrew Cagney <cagney@redhat.com>
* findvar.c (extract_unsigned_integer): Make `addr' parameter
constant. Same for local pointer variables.
(extract_signed_integer): Ditto.
* defs.h (extract_unsigned_integer): Update.
(extract_signed_integer): Update.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r-- | gdb/findvar.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c index 831ae4bc1b0..d2591321d75 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -47,12 +47,12 @@ you lose #endif LONGEST -extract_signed_integer (void *addr, int len) +extract_signed_integer (const void *addr, int len) { LONGEST retval; - unsigned char *p; - unsigned char *startaddr = (unsigned char *) addr; - unsigned char *endaddr = startaddr + len; + const unsigned char *p; + const unsigned char *startaddr = addr; + const unsigned char *endaddr = startaddr + len; if (len > (int) sizeof (LONGEST)) error ("\ @@ -81,12 +81,12 @@ That operation is not available on integers of more than %d bytes.", } ULONGEST -extract_unsigned_integer (void *addr, int len) +extract_unsigned_integer (const void *addr, int len) { ULONGEST retval; - unsigned char *p; - unsigned char *startaddr = (unsigned char *) addr; - unsigned char *endaddr = startaddr + len; + const unsigned char *p; + const unsigned char *startaddr = addr; + const unsigned char *endaddr = startaddr + len; if (len > (int) sizeof (ULONGEST)) error ("\ |