[PATCH 1/8] Simple -Wshadow=local fixes
Simon Marchi
simon.marchi@ericsson.com
Wed Oct 3 16:01:00 GMT 2018
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
More information about the Gdb-patches
mailing list