Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebjBU-00036R-Vq for pgsql-committers@arkaria.postgresql.org; Wed, 17 Jan 2018 08:35:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebjBU-0007Pg-DM for pgsql-committers@arkaria.postgresql.org; Wed, 17 Jan 2018 08:35:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ebjBU-0007PW-0C for pgsql-committers@lists.postgresql.org; Wed, 17 Jan 2018 08:35:00 +0000 Received: from mail-yw0-x241.google.com ([2607:f8b0:4002:c05::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ebjBQ-0000ZY-DY for pgsql-committers@postgresql.org; Wed, 17 Jan 2018 08:34:59 +0000 Received: by mail-yw0-x241.google.com with SMTP id m84so7986105ywd.5 for ; Wed, 17 Jan 2018 00:34:55 -0800 (PST) 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=5pxmT0inxS+xHbc/1lBvr8LGf19YH+jNl9eUd1CJg0k=; b=sjrTTZJGijsMyecDg3TxYmQsFp8aKes3aNSeVdTdXLTbIWLbgoUu3VXUiRQ8HRUUdW iemeI56voOCVTneuBjxFvDs7rKK5gwu7XlKg6LrzQva2OgcrHmwbFTkRX7l7pGM9qrjX TArn0zwFQzeXi1LUedYcjppR8lBzk9YBzosw8bHU8PyHCU+TpWGfHFsZ6MWsXeCR30eL 4dVfawzPUdUcUdAdR+YKHQ3QBhgAEPDbUBUttCgdZNqKo6857q6rPOX8/QK29ELIdDgs h3Ik667835ljQDeO5WKD0yVakyVJGAqDP+IKHFBj7DzKZ06/zo4SlAy5sqxoRBbg7ehY bqxg== 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=5pxmT0inxS+xHbc/1lBvr8LGf19YH+jNl9eUd1CJg0k=; b=AgPz/HZ9tALWOiWcJRztH7YXUp/7faJMfndySMfu6ZV5WR772AxHAmTGftnq3lvhO4 1h769MmsBMBP6N1pScK97J6e5E5cUwZhk/ZUqOq6m4ybCWi8Sr/WaAK56Vcw16j3dqrg BmUTVoQ44DSP7rdf9lA1zbsj9xcWlSgN5XnpPQQeTUW0GukM0FIt0zIgJi2k/5P9kJzZ 3kkQb/6lkCvCzGbnE2jgp38KHKhxgkuWmV4QAq8EA7pUrq2CHr3hceF8s5u652u0IeHx UwHlGeRX6gm3pU9IC9LsrKOz7HDl63zYZc67KVyJdqdnGvV24APjZ3mCYnnyUT/jwjgD i45w== X-Gm-Message-State: AKwxytfR8XiEQ1jCKYOQ+jiTEqlyf1zF6CYYX8cYVoeTSxm/sYAd+xNz 27e7rHZ6Rk359xJKrO8KxKTjnOT2bYVoRvtrvW5L7W443SNJeMsUoX6q6WAXw78qwkEmoe5OVmA 1gDdJCVD/HGJLpQaiVqSYSiG724R++rOuaaaCVdhVc1BDCf5vUvVdVmwFreJW+OeXEl30o8219n hdiJRYhlMcBngISoyn X-Google-Smtp-Source: ACJfBouIXJqjD+0rs9bwO0BPZNQxd1OBKSM/6RB3XOQ1Dl6QPaTjdsGifyAeyrLFeHytTLtlvEP7oA== X-Received: by 10.129.90.135 with SMTP id o129mr1898499ywb.232.1516178093807; Wed, 17 Jan 2018 00:34:53 -0800 (PST) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id g4sm1658091ywe.27.2018.01.17.00.34.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jan 2018 00:34:53 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pgsql: Centralize json and jsonb handling of datetime types To: Amit Langote , Andrew Dunstan Cc: pgsql-committers@postgresql.org References: Message-ID: <037c6f64-7059-41f6-0674-44694ceba972@2ndQuadrant.com> Date: Wed, 17 Jan 2018 03:34:52 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 01/17/2018 12:34 AM, Amit Langote wrote: > On Wed, Jan 17, 2018 at 9:29 AM, Andrew Dunstan wrote: >> Centralize json and jsonb handling of datetime types > [ ... ] > >> src/include/utils/date.h | 4 +- > I noticed that these changes cause the following warning to be emitted > when compiling with gcc (GCC) 6.2.0: > > In file included from gram.y:63:0: > ../../../src/include/utils/date.h:76:41: warning: ‘struct pg_tm’ > declared inside parameter list will not be visible outside of this > definition or declaration > extern int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec); > ^~~~~ > ../../../src/include/utils/date.h:77:46: warning: ‘struct pg_tm’ > declared inside parameter list will not be visible outside of this > definition or declaration > extern int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp); > > Attached is a fix. > Thanks, this is the right fix but in the wrong place. I have added the include in the file where pg_tm is actually used. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services