Add -Wold-style-definition to CFLAGS?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Add -Wold-style-definition to CFLAGS?
Дата
Msg-id 20200509174820.g4bwftmz7blz35ph@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: Add -Wold-style-definition to CFLAGS?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

ISTM that it's our coding style that we use

something
my_paramless_func(void)
{
...
}

definitions rather than omitting the (void), which makes the function
look like an old-style function declaration. I somewhat regularly notice
such omissions during review, and fix them.

Since gcc has a warning detecting such definition, I think we ought to
automatically add it when available?

The attached patch makes configure do so, and also fixes a handful of
uses that crept in.

Greetings,

Andres Freund

Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Incremental sorts and EXEC_FLAG_REWIND
Следующее
От: Ranier Vilela
Дата:
Сообщение: Re: [PATCH] Fix division by zero (explain.c)