This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 5/6] Remove unused variables
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 28 Jun 2016 15:49:53 +0100
- Subject: Re: [RFA 5/6] Remove unused variables
- Authentication-results: sourceware.org; auth=none
- References: <1465248812-23902-1-git-send-email-tom at tromey dot com> <1465248812-23902-6-git-send-email-tom at tromey dot com>
On Mon, Jun 6, 2016 at 10:33 PM, Tom Tromey <tom@tromey.com> wrote:
> diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
> index aa25911..b663f50 100644
> --- a/gdb/python/py-framefilter.c
> +++ b/gdb/python/py-framefilter.c
> @@ -211,13 +211,11 @@ py_print_type (struct ui_out *out, struct value *val)
>
> TRY
> {
> - struct type *type;
> struct ui_file *stb;
> struct cleanup *cleanup;
>
> stb = mem_fileopen ();
> cleanup = make_cleanup_ui_file_delete (stb);
> - type = check_typedef (value_type (val));
> type_print (value_type (val), "", stb, -1);
> ui_out_field_stream (out, "type", stb);
> do_cleanups (cleanup);
check_typedef has side effects, IIUC, so we can't remove the call to it.
--
Yao (éå)