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: Tom Tromey <tromey at redhat dot com>
- To: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 22 Nov 2011 11:07:16 -0700
- Subject: Re: [PATCH 20/348] Fix -Wsahdow warnings
- References: <87bos48g3j.fsf@gmail.com>
>>>>> "Andrey" == Andrey Smirnov <andrew.smirnov@gmail.com> writes:
Andrey> * amd64-tdep.c (amd64_push_dummy_call): Fix -Wshadow
Andrey> warnings.
Andrey> - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
Andrey> /* The "hidden" argument is passed throught the first argument
Andrey> register. */
Andrey> - const int arg_regnum = tdep->call_dummy_integer_regs[0];
Andrey> +
Andrey> + const int arg_regnum =
Andrey> + gdbarch_tdep (gdbarch)->call_dummy_integer_regs[0];
Here you can just remove 'tdep' and use the outer one.
It has the same value.
That is, no change to arg_regnum's initialization is needed.
Tom