This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] constify search_symbols
- From: Yao Qi <yao at codesourcery dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 24 Jun 2014 21:42:44 +0800
- Subject: Re: [PATCH] constify search_symbols
- Authentication-results: sourceware.org; auth=none
- References: <1403285060-5556-1-git-send-email-tromey at redhat dot com> <53A8EC05 dot 2030901 at codesourcery dot com> <87mwd24f9j dot fsf at fleche dot redhat dot com>
On 06/24/2014 09:18 PM, Tom Tromey wrote:
>>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
>
> Yao> file_name isn't used out side of this block, so we can define file_name
> Yao> within this block of type "char *", and patch can be shorter.
>
> The problem is that we need to set "file_names = &file_name", and you
> can't take the address of a "char *" and cast that to "const char **".
>
Ah. You are right. Compiler complains on this statement "files =
&file_name". I have no comments on this patch then.
--
Yao (éå)