Re: pgsql: Sync our copy of the timezone library with IANA release tzcode20

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Sync our copy of the timezone library with IANA release tzcode20
Date: 2019-07-19 18:56:34
Message-ID: 2143.1563562594@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

I wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> writes:
>> This is causing a compilation warning on Windows:
> ...so I think your compiler has a point. I shall complain to upstream.

The IANA folk want to fix it like this:

diff --git a/zic.c b/zic.c
index 8bf5628..a84703a 100644
--- a/zic.c
+++ b/zic.c
@@ -2145,7 +2145,7 @@ writezone(const char *const name, const char *const string, char version,
}
if (pass == 1 && !want_bloat()) {
utcnt = stdcnt = thisleapcnt = 0;
- thistimecnt = - locut - hicut;
+ thistimecnt = - (locut + hicut);
thistypecnt = thischarcnt = 1;
thistimelim = thistimei;
}

I'm not quite convinced whether that will silence the warning, but
at least it's a bit less unreadable.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2019-07-19 20:47:19 pgsql: pg_stat_statements: add missing check for pgss_enabled().
Previous Message Tom Lane 2019-07-19 18:49:56 pgsql: Silence compiler warning, hopefully.

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-07-19 18:57:25 Re: should there be a hard-limit on the number of transactions pending undo?
Previous Message Steven Pousty 2019-07-19 18:53:00 Re: SQL/JSON path issues/questions