[Proposal] Level4 Warnings show many shadow vars

From: Ranier Vilela <ranier_gyn(at)hotmail(dot)com>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [Proposal] Level4 Warnings show many shadow vars
Date: 2019-12-04 01:24:28
Message-ID: MN2PR18MB2927F7B5F690065E1194B258E35D0@MN2PR18MB2927.namprd18.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
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 waste of variable declaration.
With the current Level3 level, development is no longer checking and correcting shadow variables.

Any comments?

Best regards,
Ranier Vilela

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-12-04 02:35:28 Re: pgbench -i progress output on terminal
Previous Message Michael Paquier 2019-12-04 01:10:12 Re: fe-utils - share query cancellation code