Re: pg_upgrade's exec_prog() coding improvement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_upgrade's exec_prog() coding improvement
Дата
Msg-id 20783.1345820596@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_upgrade's exec_prog() coding improvement  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: pg_upgrade's exec_prog() coding improvement
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> It sounds like it is suggestioning to use more specific attribute
> decoration.  This might be relevant:

>     http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
>     -Wmissing-format-attribute
>         Warn about function pointers that might be candidates for format
>     attributes. Note these are only possible candidates, not absolute ones.
>     GCC guesses that function pointers with format attributes that are used
>     in assignment, initialization, parameter passing or return statements
>     should have a corresponding format attribute in the resulting type. I.e.
>     the left-hand side of the assignment or initialization, the type of the
>     parameter variable, or the return type of the containing function
>     respectively should also have a format attribute to avoid the warning.
>         GCC also warns about function definitions that might be candidates
>     for format attributes. Again, these are only possible candidates. GCC
>     guesses that format attributes might be appropriate for any function
>     that calls a function like vprintf or vscanf, but this might not always
>     be the case, and some functions for which format attributes are
>     appropriate may not be detected. 

> and I see this option enabled in configure.in.

Hm.  I'm a bit dubious about enabling warnings that are so admittedly
heuristic as this.  They admit that the warnings might be wrong, and
yet document no way to shut them up.  I think we might be better advised
to not enable this warning.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: plperl sigfpe reset can crash the server
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: plperl sigfpe reset can crash the server