[PATCH 20/348] Fix -Wsahdow warnings
Tom Tromey
tromey@redhat.com
Tue Nov 22 18:07:00 GMT 2011
>>>>> "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
More information about the Gdb-patches
mailing list