This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 18/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:36:01 +0100 (CET)
- Subject: Re: [PATCH 18/348] Fix -Wsahdow warnings
- References: <87ehx08g69.fsf@gmail.com>
> From: Andrey Smirnov <andrew.smirnov@gmail.com>
> Date: Tue, 22 Nov 2011 20:01:18 +0700
>
> >From 6347add7f352c5e9994f7a5de938e8a7dacc98f9 Mon Sep 17 00:00:00 2001
> From: Andrey Smirnov <andrew.smirnov@gmail.com>
> Date: Tue, 22 Nov 2011 17:25:56 +0700
> Subject: [PATCH 18/39] Fix -Wshadow warnings.
>
> * amd64-linux-tdep.c (amd64_canonicalize_syscall): Fix -Wshadow
> warnings.
Why the hell does -Wshadow complain here?
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 54284cf..7f049a8 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,3 +1,8 @@
> +2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
> +
> + * amd64-linux-tdep.c (amd64_canonicalize_syscall): Fix -Wshadow
> + warnings.
> +
> 2011-11-19 Andrey Smirnov <andrew.smirnov@gmail.com>
>
> * ada-valprint.c (ada_val_print_1): Fix -Wshadow warnings.
> diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
> index 0119838..84b58a0 100644
> --- a/gdb/amd64-linux-tdep.c
> +++ b/gdb/amd64-linux-tdep.c
> @@ -339,9 +339,9 @@ amd64_all_but_ip_registers_record (struct regcache *regcache)
> process record. */
>
> static enum gdb_syscall
> -amd64_canonicalize_syscall (enum amd64_syscall syscall)
> +amd64_canonicalize_syscall (enum amd64_syscall syscall_number)
> {
> - switch (syscall) {
> + switch (syscall_number) {
> case amd64_sys_read:
> return gdb_sys_read;
>
> --
> 1.7.5.4
>
>