Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dunnx-00036e-IZ for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2017 22:49:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dunnx-0001gK-5A for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2017 22:49:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dunnv-0001aq-E0 for pgsql-hackers@postgresql.org; Wed, 20 Sep 2017 22:49:15 +0000 Received: from mail-yw0-x22b.google.com ([2607:f8b0:4002:c05::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dunns-0000MC-Je for pgsql-hackers@postgresql.org; Wed, 20 Sep 2017 22:49:14 +0000 Received: by mail-yw0-x22b.google.com with SMTP id q80so2946690ywg.2 for ; Wed, 20 Sep 2017 15:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=o5I0/gpMVdvzlP2QyeEw4KeKxb2O2DLgRekj9WYpobY=; b=U/QDnK4poumxO9NYe351uQ3m5PVI/10qDHTpRvUpk5DCJFwKMM6vXGM65TIlB7891g LiMLeti59KeT+btR6xu91CqMwkHGQLBW+m5ZEUp3h8FTb8pBt89CV6Ya92J1yBRJTd9R fb8TiGM94kCyMFIf6fLC5BHqO96PuhUG/oXjeGEYdFFzbOJG9wW/xLrNCYVspfeGwZeM KGLKqHrgmVzYYxZZ147hs1h6tkEDww33ELNAja8z7GGf50r6DmKfm/I0vWobO5dFJFzN 6Wmh49BIZk9DYxwxhnt20fj9iLXyh9Xy4t3kAMJRTgMaN3lkLBCBYtuxcRY7nfQDGUsf ITRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=o5I0/gpMVdvzlP2QyeEw4KeKxb2O2DLgRekj9WYpobY=; b=KvzTGhhdW4Ee2Z0eABRKSsmZTYnVJye6x0DXLa6bQSBK+WNGBWkbuyDTcPtjRCHsT2 CURWj6Yfc0cdmUTJam7mB27jhQEv8kEvM87rvLU+j2nwXLTIV8VMWdTJNOe4mgx0xy0E plO8L9tiqkgGNXnALHWDxQHsyOSErnoRwLICXnjJHe2SuBLGWEXJwtEu/pdU+W9Ua3eu vnR/WznL3tXv/fr9tAvFdgL8nbr17N29kjt8ERCcHSwywd5iAciBgXKWibljcwobgpRz QZGtoSyk4Qa7QrdK1Jw/MpPjlOZSVht+HNZx9M9hTI1nYrhljkze6Q7dxRzoEZk/YwmP CyeA== X-Gm-Message-State: AHPjjUgfQI9KYtU8uAvH0CJ/FPHIaHA/o6fqx1sp89Ypw4NeCJe0X3yC 3mxb++g52upqLpVDtXtbU/hcpiuAHNNVDcvBQu8TzQ+6UuKu7Ve3l0rUYiS/jSd348Hx4Kj5nlg CxjVDnBgIUiy8G0/64xcvmPlYsapfJ85e+5ssxr1BWKetH2YxeuwpHq3qgCpA7w+fC8nkT6hYta gUZf0aLDgyuBf9 X-Google-Smtp-Source: AOwi7QAEaQNUW1CP77WSXCmv1ASy1HlJpnFMEFzVdJorgqGRynx3bP2pu1IEcyBNnpxPUrgNbIhKxg== X-Received: by 10.129.52.23 with SMTP id b23mr213952ywa.43.1505947751329; Wed, 20 Sep 2017 15:49:11 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id q131sm12412ywq.8.2017.09.20.15.49.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 15:49:10 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: Windows warnings from VS 2017 To: Michael Paquier Cc: PostgreSQL-development References: Message-ID: <7cabcef8-c2eb-f7d1-e4a2-63b93115b75c@2ndQuadrant.com> Date: Wed, 20 Sep 2017 18:49:10 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 09/20/2017 06:13 PM, Michael Paquier wrote: > On Thu, Sep 21, 2017 at 7:08 AM, Andrew Dunstan > 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