Reland "Get base building with -Wshadow"

This is a reland of b58d69403ab90713e4922042d76563d021855d76
Original change's description:
> Get base building with -Wshadow
> 
> Variable shadowing is legal and well defined but can make code harder to
> read and can hide some classes of bugs. This change gets base building
> with -Wshadow. The changes required seem to improve the code in most
> cases, and neutral in others.
> 
> This CL uses a number of techniques to avoid shadowing
> * reuse - don't declare a new variable if not needed
> * rename - if a new variable is needed, use a new name
> * reduce - make the scope smaller
> * remove - remove duplicate constant declarations
> 
> I particularly like the for loop technique for reducing scope. We
> should probably prefer 'for' over 'while' for many loops.
> 
> Change-Id: Iad81f0ca22937653a36781e55d53aca8e38672aa
> Reviewed-on: https://chromium-review.googlesource.com/767654
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#516850}

Change-Id: I43258f86c51263b2aad665f61527823c3fea9db5
Reviewed-on: https://chromium-review.googlesource.com/773832
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#517035}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ec0158516af927aeb0e16229e5b3768cfd40fd52
1 file changed