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


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


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