Lists: | pgsql-hackers |
---|
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | pg_xlogdump compiler warning |
Date: | 2013-02-25 23:15:48 |
Message-ID: | 1361834148.819.10.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
compat.c: In function ‘timestamptz_to_str’:
compat.c:56:9: error: passing argument 1 of ‘localtime’ from incompatible pointer type [-Werror]
In file included from compat.c:21:0:
/usr/include/time.h:237:19: note: expected ‘const time_t *’ but argument is of type ‘pg_time_t *’
gcc 4.7.2
From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_xlogdump compiler warning |
Date: | 2013-02-26 12:35:41 |
Message-ID: | 20130226123541.GE4405@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
On 2013-02-25 18:15:48 -0500, Peter Eisentraut wrote:
> compat.c: In function ‘timestamptz_to_str’:
> compat.c:56:9: error: passing argument 1 of ‘localtime’ from incompatible pointer type [-Werror]
> In file included from compat.c:21:0:
> /usr/include/time.h:237:19: note: expected ‘const time_t *’ but argument is of type ‘pg_time_t *’
>
> gcc 4.7.2
32bit I guess?
A simple cast should do for now. Patch attached.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
correct-cast-to-time_t.patch | text/x-patch | 583 bytes |
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_xlogdump compiler warning |
Date: | 2013-02-26 20:52:01 |
Message-ID: | 21281.1361911921@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2013-02-25 18:15:48 -0500, Peter Eisentraut wrote:
>> compat.c: In function timestamptz_to_str:
>> compat.c:56:9: error: passing argument 1 of localtime from incompatible pointer type [-Werror]
>> In file included from compat.c:21:0:
>> /usr/include/time.h:237:19: note: expected const time_t * but argument is of type pg_time_t *
> 32bit I guess?
Yeah, I see the same on a 32-bit machine.
> A simple cast should do for now. Patch attached.
Pushed along with some other, more cosmetic cleanups.
regards, tom lane
From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_xlogdump compiler warning |
Date: | 2013-02-27 10:01:06 |
Message-ID: | 20130227100106.GA7733@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 2013-02-26 15:52:01 -0500, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > On 2013-02-25 18:15:48 -0500, Peter Eisentraut wrote:
> >> compat.c: In function ‘timestamptz_to_str’:
> >> compat.c:56:9: error: passing argument 1 of ‘localtime’ from incompatible pointer type [-Werror]
> >> In file included from compat.c:21:0:
> >> /usr/include/time.h:237:19: note: expected ‘const time_t *’ but argument is of type ‘pg_time_t *’
>
> > 32bit I guess?
>
> Yeah, I see the same on a 32-bit machine.
>
> > A simple cast should do for now. Patch attached.
>
> Pushed along with some other, more cosmetic cleanups.
Thanks. The statics's et al were stupid, my fault.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services