Using -Wshadow - Mailing list pgsql-hackers

From Neil Conway
Subject Using -Wshadow
Date
Msg-id 877k1psmpf.fsf@mailbox.samurai.com
Whole thread Raw
Responses Re: Using -Wshadow
Re: Using -Wshadow
List pgsql-hackers
GCC supports the -Wshadow command-line option:
      -Wshadow          Warn whenever a local variable shadows another local          variable, parameter or global
variableor whenever a          built-in function is shadowed.
 

Currently, enabling this for the PostgreSQL tree produces a lot of
warnings. Would anyone object if I corrected these usages of a
shadowed local variable, and then enabled this warning flag for
standard GCC builds? (as is currently done for -Wmissing-prototypes,
-Wmissing-declarations, and -Wall).

If there are any other GCC warning flags anyone else feels would be
useful, let me know.

-Neil



pgsql-hackers by date:

Previous
From: ohp@pyrenet.fr
Date:
Subject: How can I avoid that
Next
From: Tom Lane
Date:
Subject: Re: CVS HEAD is broken