Re: additional GCC warning flags

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: additional GCC warning flags
Дата
Msg-id 16583.1098202607@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: additional GCC warning flags  (Neil Conway <neilc@samurai.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: additional GCC warning flags
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: pg_regress --temp-keep