From d160942fa5f8a18a1b237c028254382bcb836924 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 7 May 2010 18:49:27 +0000 Subject: [PATCH] 2010-05-07 Michael Snyder * valops.c (value_cast_pointers): Restore unused variable 'type1', and use it to compute variable 't1'. --- gdb/ChangeLog | 5 +++++ gdb/valops.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f4673152156..950ce2f1709 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-05-07 Michael Snyder + + * valops.c (value_cast_pointers): Restore unused variable 'type1', + and use it to compute variable 't1'. + 2010-05-07 Joel Brobecker * ada-lang.c (assign_aggregate): Remove unused variable. diff --git a/gdb/valops.c b/gdb/valops.c index 7979db91c00..e18d9c802a7 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -300,8 +300,9 @@ value_cast_structs (struct type *type, struct value *v2) struct value * value_cast_pointers (struct type *type, struct value *arg2) { + struct type *type1 = check_typedef (type); struct type *type2 = check_typedef (value_type (arg2)); - struct type *t1 = check_typedef (TYPE_TARGET_TYPE (type)); + struct type *t1 = check_typedef (TYPE_TARGET_TYPE (type1)); struct type *t2 = check_typedef (TYPE_TARGET_TYPE (type2)); if (TYPE_CODE (t1) == TYPE_CODE_STRUCT -- 2.30.2