This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 20/348] Fix -Wsahdow warnings
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: andrew dot smirnov at gmail dot com
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 23 Nov 2011 17:39:39 +0100 (CET)
- Subject: Re: [PATCH 20/348] Fix -Wsahdow warnings
- References: <87bos48g3j.fsf@gmail.com>
> From: Andrey Smirnov <andrew.smirnov@gmail.com>
> Date: Tue, 22 Nov 2011 20:02:56 +0700
>
> From: Andrey Smirnov <andrew.smirnov@gmail.com>
> Date: Tue, 22 Nov 2011 17:29:45 +0700
>
> * amd64-tdep.c (amd64_push_dummy_call): Fix -Wshadow
> warnings.
That's a stupid change. Please simply remove the 2nd tdep declaration
in that function and leave the rest of the code as is.
> diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
> index 29101a4..095a34f 100644
> --- a/gdb/amd64-tdep.c
> +++ b/gdb/amd64-tdep.c
> @@ -878,10 +878,11 @@ amd64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
> /* Pass "hidden" argument". */
> if (struct_return)
> {
> - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
> /* The "hidden" argument is passed throught the first argument
> register. */
> - const int arg_regnum = tdep->call_dummy_integer_regs[0];
> +
> + const int arg_regnum =
> + gdbarch_tdep (gdbarch)->call_dummy_integer_regs[0];
>
> store_unsigned_integer (buf, 8, byte_order, struct_addr);
> regcache_cooked_write (regcache, arg_regnum, buf);
> --
> 1.7.5.4
>
>