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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: clang's -Wmissing-variable-declarations shows some shoddy programming
Date: 2013-12-19 21:10:31
Message-ID: 20131219211031.GE1690@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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
> > 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 people simply
> > haven't bothered to add the variable to a header. Some of them with
> > comments declaring that fact, others adding longer comments, even others
> > adding longer comments about that fact.
> >
> > I've attached the output of such a compilation run for those without
> > clang.
>
> 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 warnings too.
>
> The attached patch accomplishes this.

Patch applied.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-12-19 21:11:44 Re: clang's -Wmissing-variable-declarations shows some shoddy programming
Previous Message Sergey Konoplev 2013-12-19 21:08:18 Re: pg_upgrade & tablespaces