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 04:06:01
Message-ID: 31996.1563509161@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> This is causing a compilation warning on Windows:

> src/timezone/zic.c(2401): warning C4804: '-' : unsafe use of type
> 'bool' in operation

Hmmm ... the code looks like

bool locut,
hicut;
...
thistimecnt = -locut - hicut;

so I think your compiler has a point. I shall complain to upstream.
At best, it's really unobvious what this code is meant to do, and
at worst (eg, depending on whether bool promotes to signed or unsigned
int) the results are unportable.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-07-19 18:49:56 pgsql: Silence compiler warning, hopefully.
Previous Message Michael Paquier 2019-07-19 03:53:47 Re: pgsql: Sync our copy of the timezone library with IANA release tzcode20

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-07-19 04:10:02 Re: POC: Cleaning up orphaned files using undo logs
Previous Message Hubert Zhang 2019-07-19 03:57:55 How to create named portal except cursor?