Re: additional GCC warning flags - Mailing list pgsql-patches

From Tom Lane
Subject Re: additional GCC warning flags
Date
Msg-id 16583.1098202607@sss.pgh.pa.us
Whole thread Raw
In response to Re: additional GCC warning flags  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> -Wstrict-prototypes causes a few distinct warnings but they are emitted
> repeatedly. At least one does not seem easily solvable:
> expression_tree_walker() and friends declare the callback function as
> bool (*walker) (), but it seems a pain to make that type declaration
> more precise.

Yeah; I deliberately left that callback weakly typed, because it seemed
that the alternative was to expect every caller to cast, which would
effectively disable any error checking you might hope to get anyway :-(

> -Wnested-externs causes a single warning (postmaster.c:580) that seems
> fixable, so that might be worth enabling.

Agreed.  That extern is pretty bogus in itself...

> If I've missed any you think might be useful, let me know.

-Wbad-function-cast might possibly be interesting, although I'm afraid
it would be likely to barf on some of our Datum<=>pointer conversions.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: additional GCC warning flags
Next
From: Fabien COELHO
Date:
Subject: Re: pg_regress --temp-keep