* valops.c (value_slice): Move declaration of `offset' to avoid
warning.
This commit is contained in:
parent
5633f84268
commit
7a67d0fe2b
2 changed files with 7 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue