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: [PATCH 20/348] Fix -Wsahdow warnings


>>>>> "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


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