Re: [HACKERS] Windows warnings from VS 2017 - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [HACKERS] Windows warnings from VS 2017
Date
Msg-id 7cabcef8-c2eb-f7d1-e4a2-63b93115b75c@2ndQuadrant.com
Whole thread Raw
In response to Re: [HACKERS] Windows warnings from VS 2017  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] Windows warnings from VS 2017
Re: [HACKERS] Windows warnings from VS 2017
List pgsql-hackers

On 09/20/2017 06:13 PM, Michael Paquier wrote:
> On Thu, Sep 21, 2017 at 7:08 AM, Andrew Dunstan
> <andrew.dunstan@2ndquadrant.com> wrote:
>> First, it warns about a couple of unused variables at lines 4553 and
>> 4673 of src/backend/optimizer/path/costsize.c. I think we can do a
>> little rearrangement to keep it happy there.
> Those are around for some time, see here:
> https://www.postgresql.org/message-id/CAB7nPqTkW=b_1JVvYWd_G0WrKOT+4uFQjGGrv8osQbUZzXGXdA@mail.gmail.com
> But there has been no actual agreement about how to fix them..


Oh. Missed that.

My solution was going to be slightly different. I was going to enclose
the #ifdef'd code in a bare block and move the rte declaration inside
that block.

I think the difference between these cases and other cases of the
PG_USER_FOR_ASSERTS_ONLY macro is that these variables are only even
written to by assert-enabled code, whereas in the other cases the
variable is written to by non-assert-enabed code but only read by
assert-enabled code. The Microsoft compilers don't seem to mind that so
much.

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Add basic TAP test setup for pg_upgrade
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Re: proposal - psql: possibility to specify sort fordescribe commands, when size is printed