pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <akorotkov@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Multirange datatypes
Date: Tue, 29 Dec 2020 20:11:39 -0500
Message-ID: <2246043.1609290699@sss.pgh.pa.us> (raw)
In-Reply-To: <E1kqqDc-0004FM-5a@gemulon.postgresql.org>
References: <E1kqqDc-0004FM-5a@gemulon.postgresql.org>

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





view thread (19+ messages)  latest in thread

Message-ID: <2246043.1609290699@sss.pgh.pa.us>
Permalink:  ../2246043.1609290699@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2246043.1609290699@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, akorotkov@postgresql.org
  Subject: Re: pgsql: Multirange datatypes
  In-Reply-To: <2246043.1609290699@sss.pgh.pa.us>
  References: <E1kqqDc-0004FM-5a@gemulon.postgresql.org> <2246043.1609290699@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox