Re: [Proposal] Level4 Warnings show many shadow vars - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [Proposal] Level4 Warnings show many shadow vars
Date
Msg-id CA+TgmoYh+qHFYVnH2ihw5+SiVwGEmFkWiZaO0E-rv5hNbaeirA@mail.gmail.com
Whole thread Raw
In response to [Proposal] Level4 Warnings show many shadow vars  (Ranier Vilela <ranier_gyn@hotmail.com>)
Responses RE: [Proposal] Level4 Warnings show many shadow vars
List pgsql-hackers
On Tue, Dec 3, 2019 at 8:24 PM Ranier Vilela <ranier_gyn@hotmail.com> wrote:
> I believe PostgreSQL can benefit from changing the alert level of compilation warnings.
> The current Level3 level for windows does not show any alerts, but that does not mean that there are no problems.
> Changing the level to Level4 and its equivalent for GCC in Unix environments will show many warnings for shadow
variables,including global variables.
 
> True, there will also be many silly alerts that can be safely disabled.
> Shadow variables, although they may not currently represent bugs, may be hiding errors, or at the very least, it is a
wasteof variable declaration.
 
> With the current Level3 level, development is no longer checking and correcting shadow variables.
>
> Any comments?

Most of us don't develop on Windows, so changing warning levels on
Windows won't really affect what developers see on their own machines,
and thus probably doesn't have much value. It might be a good idea to
try to clean up some/many cases of shadowed variables, though.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Online checksums patch - once again
Next
From: Robert Haas
Date:
Subject: Re: Online checksums patch - once again