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: [PATCH] Fix FIXME: xstrdup should not be here


> Date: Fri, 13 Sep 2013 14:49:11 +0800
> From: Yao Qi <yao@codesourcery.com>
> 
> On 09/10/2013 10:32 AM, Yao Qi wrote:
> > gdb:
> > 
> > 2013-09-10  Yao Qi<yao@codesourcery.com>
> > 
> > 	* varobj.c (update_dynamic_varobj_children): Duplicate 'name'
> > 	and pass it to install_dynamic_child.
> > 	(create_child_with_value): Update comments.  Don't duplicate
> > 	'name'.
> 
> Here is the updated version, with a cast NAME to 'char *'.

If you do this, you should drop the const from the
install_dynamic_child() prototype instead of adding the (char *) cast.


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