This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/8] Simple -Wshadow=local fixes
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Tom Tromey <tom at tromey dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 3 Oct 2018 16:01:27 +0000
- Subject: Re: [PATCH 1/8] Simple -Wshadow=local fixes
- References: <20180923040814.27941-1-tom@tromey.com> <20180923040814.27941-2-tom@tromey.com>
On 2018-09-23 12:08 AM, Tom Tromey wrote:
> This fixes all the straightforward -Wshadow=local warnings in gdb. A
> few standard approaches are used here:
>
> * Renaming an inner (or outer, but more commonly inner) variable;
> * Lowering a declaration to avoid a clash;
> * Moving a declaration into a more inner scope to avoid a clash,
> including the special case of moving a declaration into a loop header.
>
> I did not consider any of the changes in this patch to be particularly
> noteworthy, though of course they should all still be examined.
This LGTM, although if there was some subtle bug, like missing updating one
variable reference somewhere, I would probably miss it.
Simon