On 12/3/19 5:24 PM, Ranier Vilela wrote:
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?
I suggested increasing the default warnings in an email some time ago, to which Tom made reasonable objections. You might want to take a look at his comments, and consider if you can overcome the concerns he had: https://www.postgresql.org/message-id/25938.1487367117%40sss.pgh.pa.us and https://www.postgresql.org/message-id/30007.1487374499%40sss.pgh.pa.us -- Mark Dilger