Re: pgsql: Multirange datatypes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Multirange datatypes
Date: 2020-12-30 01:11:39
Message-ID: 2246043.1609290699@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Alexander Korotkov <akorotkov(at)postgresql(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-12-30 01:44:23 pgsql: Doc: fix up PDF build warnings from over-width table columns.
Previous Message Tom Lane 2020-12-29 23:03:07 pgsql: Suppress log spam from multiple reports of SIGQUIT shutdown.