Re: pgsql: Centralize json and jsonb handling of datetime types - Mailing list pgsql-committers

From Andrew Dunstan
Subject Re: pgsql: Centralize json and jsonb handling of datetime types
Date
Msg-id 037c6f64-7059-41f6-0674-44694ceba972@2ndQuadrant.com
Whole thread Raw
In response to Re: pgsql: Centralize json and jsonb handling of datetime types  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: pgsql: Centralize json and jsonb handling of datetime types
List pgsql-committers

On 01/17/2018 12:34 AM, Amit Langote wrote:
> On Wed, Jan 17, 2018 at 9:29 AM, Andrew Dunstan <andrew@dunslane.net> 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



pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Fix compiler warnings due to commit cc4feded
Next
From: Amit Langote
Date:
Subject: Re: pgsql: Centralize json and jsonb handling of datetime types