Re: pgsql: Multirange datatypes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Multirange datatypes
Дата
Msg-id 2246043.1609290699@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Multirange datatypes  (Alexander Korotkov <akorotkov@postgresql.org>)
Ответы Re: pgsql: Multirange datatypes
Список pgsql-committers
Alexander Korotkov <akorotkov@postgresql.org> writes:
> Multirange datatypes

Multiple buildfarm members are issuing similar warnings about
multirangetypes.c:

 calliphoridae | 2020-12-29 23:10:11 |
/home/andres/build/buildfarm-calliphoridae/HEAD/pgsql.build/../pgsql/src/backend/utils/adt/multirangetypes.c:218:37:
warning:suggest braces around empty body in an 'else' statement [-Wempty-body] 
 calliphoridae | 2020-12-29 23:10:11 |
/home/andres/build/buildfarm-calliphoridae/HEAD/pgsql.build/../pgsql/src/backend/utils/adt/multirangetypes.c:236:37:
warning:suggest braces around empty body in an 'else' statement [-Wempty-body] 

These are evidently unhappy with code like

                if ...
                   ...
                }
                else
                     /* include it in range_str */ ;

So apparently preferred style is more like

                else
                {
                     /* include it in range_str */
                }

I don't particularly care for the wording of this comment, either:
it looks like it's describing an action that's about to be taken,
only there's no action there.  Could it say something more like
"we already included it in range_str", or "we'll include it in
range_str below the switch", or whatever's appropriate?

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Suppress log spam from multiple reports of SIGQUIT shutdown.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: fix up PDF build warnings from over-width table columns.