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: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: mark dot kettenis at xs4all dot nl (Mark Kettenis)
- Cc: andrew dot smirnov at gmail dot com, gdb-patches at sourceware dot org
- Date: Wed, 23 Nov 2011 17:40:41 +0100 (CET)
- Subject: Re: [PATCH 18/348] Fix -Wsahdow warnings
Mark Kettenis wrote:
> > 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?
> > -amd64_canonicalize_syscall (enum amd64_syscall syscall)
> > +amd64_canonicalize_syscall (enum amd64_syscall syscall_number)
I'd expect this is because the parameter "syscall" shadows the global
function declaration "syscall" provided by glibc headers:
/usr/include/unistd.h:extern long int syscall (long int __sysno, ...) __THROW;
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com