This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 6/8] Avoid shadowing in fdwalk
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 11 Oct 2018 21:54:47 -0700
- Subject: Re: [PATCH 6/8] Avoid shadowing in fdwalk
- References: <20180923040814.27941-1-tom@tromey.com> <20180923040814.27941-7-tom@tromey.com>
On Sat, 22 Sep 2018 22:08:12 -0600
Tom Tromey <tom@tromey.com> wrote:
> -Wshadow=local caught this buglet. fdwalk redeclares "result" in the
> inner scope, meaning that this function will always return 0, even on
> error.
Wow!
> gdb/ChangeLog
> 2018-09-22 Tom Tromey <tom@tromey.com>
>
> * common/filestuff.c (fdwalk): Remove inner declaration of
> "result".
This is okay.
Kevin