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: [RFA 5/6] Remove unused variables


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 (éå)


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