Re: [HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2014-02-08 Thread Peter Eisentraut
On Fri, 2013-12-20 at 00:09 +0100, Andres Freund wrote: > The attached patch fixes some of the easiest cases, where either an > include was missing o a variable should have been static. committed -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subs

Re: [HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2013-12-19 Thread Andres Freund
On 2013-12-19 14:56:38 -0800, Kevin Grittner wrote: > Bruce Momjian wrote: > > > I have fixed the binary_upgrade_* variables defines, and Heikki has > > fixed some other cases.  Can you rerun the test against git head and > > post the updated output?  Thanks. > > I'm now seeing the attached. He

Re: [HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2013-12-19 Thread Kevin Grittner
Bruce Momjian wrote: > I have fixed the binary_upgrade_* variables defines, and Heikki has > fixed some other cases.  Can you rerun the test against git head and > post the updated output?  Thanks. I'm now seeing the attached. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise Po

Re: [HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2013-12-19 Thread Bruce Momjian
On Sat, Dec 14, 2013 at 04:52:28PM +0100, Andres Freund wrote: > Hi, > > Compiling postgres with said option in CFLAGS really gives an astounding > number of warnings. Except some bison/flex generated ones, none of them > looks acceptable to me. > Most are just file local variables with a missing

Re: [HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2013-12-19 Thread Bruce Momjian
On Wed, Dec 18, 2013 at 10:11:03PM -0500, Bruce Momjian wrote: > On Sat, Dec 14, 2013 at 04:52:28PM +0100, Andres Freund wrote: > > Hi, > > > > Compiling postgres with said option in CFLAGS really gives an astounding > > number of warnings. Except some bison/flex generated ones, none of them > > l

Re: [HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2013-12-19 Thread Andres Freund
Hi, On 2013-12-18 22:11:03 -0500, Bruce Momjian wrote: > Now that pg_upgrade has stabilized, I think it is time to centralize all > the pg_upgrade_support control variables in a single C include file that > can be used by the backend and by pg_upgrade_support. This will > eliminate the compiler w

Re: [HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2013-12-18 Thread Bruce Momjian
On Sat, Dec 14, 2013 at 04:52:28PM +0100, Andres Freund wrote: > Hi, > > Compiling postgres with said option in CFLAGS really gives an astounding > number of warnings. Except some bison/flex generated ones, none of them > looks acceptable to me. > Most are just file local variables with a missing

Re: [HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2013-12-14 Thread Andres Freund
On 2013-12-14 12:14:25 -0500, Tom Lane wrote: > Andres Freund writes: > > Compiling postgres with said option in CFLAGS really gives an astounding > > number of warnings. Except some bison/flex generated ones, none of them > > looks acceptable to me. > > Given that we're not going to be able to g

Re: [HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2013-12-14 Thread Tom Lane
Andres Freund writes: > Compiling postgres with said option in CFLAGS really gives an astounding > number of warnings. Except some bison/flex generated ones, none of them > looks acceptable to me. Given that we're not going to be able to get rid of the bison/flex cases, is this really something t

[HACKERS] clang's -Wmissing-variable-declarations shows some shoddy programming

2013-12-14 Thread Andres Freund
Hi, Compiling postgres with said option in CFLAGS really gives an astounding number of warnings. Except some bison/flex generated ones, none of them looks acceptable to me. Most are just file local variables with a missing static and easy to fix. Several other are actually shared variables, where