This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Remove deprecated_set_value_type (part 1)


> Date: Wed, 30 Jan 2008 11:38:32 +0000
> From: "Rob Quill" <rob.quill@gmail.com>
> 
> Index: gdb/c-valprint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/c-valprint.c,v
> retrieving revision 1.48
> diff -u -p -r1.48 c-valprint.c
> --- gdb/c-valprint.c	11 Jan 2008 13:34:14 -0000	1.48
> +++ gdb/c-valprint.c	30 Jan 2008 11:20:33 -0000
> @@ -562,8 +562,7 @@ c_value_print (struct value *val, struct
>  	       * error about a non-pointer type in value_rtti_target_type
>  	       */
>  	      struct value *temparg;
> -	      temparg=value_copy(val);
> -	      deprecated_set_value_type (temparg, lookup_pointer_type
> (TYPE_TARGET_TYPE(type)));
> +	      temparg=value_addr (val);
>  	      val=temparg;
>  	    }

There are some code style problems here too, and although they're not
your fault, it'd be nice to fix them while you're there.  Actually, it
looks to me as if the temparg variable is completely redundant now, so
the above could be simplified to

              val = value_addr (val);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]