diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2002-11-22 16:32:45 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2002-11-22 16:32:45 +0000 |
commit | 7a67d0fe2b79a77298bb55ab0e8a8f3f5bf223b7 (patch) | |
tree | 20c848de5339ecb988792aab6694aab6ccb7999d /gdb | |
parent | 5633f842680a9fa40ec0fa6cd40ca2ab5d6bb7fb (diff) | |
download | fsf-binutils-gdb-7a67d0fe2b79a77298bb55ab0e8a8f3f5bf223b7.zip fsf-binutils-gdb-7a67d0fe2b79a77298bb55ab0e8a8f3f5bf223b7.tar.gz fsf-binutils-gdb-7a67d0fe2b79a77298bb55ab0e8a8f3f5bf223b7.tar.bz2 |
* valops.c (value_slice): Move declaration of `offset' to avoid
warning.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/valops.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 995ef57..9bd4cab 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-11-22 Andreas Schwab <schwab@suse.de> + + * valops.c (value_slice): Move declaration of `offset' to avoid + warning. + 2002-11-22 Christopher Faylor <cgf@redhat.com> * win32-nat.c (psapi_get_dll_name): Fix a compiler warning. diff --git a/gdb/valops.c b/gdb/valops.c index 2249e8a..a1da69d 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -3392,7 +3392,7 @@ struct value * value_slice (struct value *array, int lowbound, int length) { struct type *slice_range_type, *slice_type, *range_type; - LONGEST lowerbound, upperbound, offset; + LONGEST lowerbound, upperbound; struct value *slice; struct type *array_type; array_type = check_typedef (VALUE_TYPE (array)); @@ -3443,7 +3443,7 @@ value_slice (struct value *array, int lowbound, int length) else { struct type *element_type = TYPE_TARGET_TYPE (array_type); - offset + LONGEST offset = (lowbound - lowerbound) * TYPE_LENGTH (check_typedef (element_type)); slice_type = create_array_type ((struct type *) NULL, element_type, slice_range_type); |