Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Fix one more cast for _open_osfhandle().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Fix one more cast for _open_osfhandle().
Date: 2010-01-16 16:04:06
Message-ID: 7161.1263657846@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Magnus Hagander <magnus(at)hagander(dot)net> writes:
> 2010/1/2 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> If those are a problem then presumably syslogger_parseArgs needs work
>> too ... and I rather wonder where the value it's reading comes from.

> Well, it doesn't generate a warning..  It only did that when the cast
> was incorrect. Should we add it purely for consistency?

You're missing the point entirely: this isn't about suppressing a
warning, it's about that the code will fail outright if the pointer value
doesn't fit in 32 bits.  "int fd" is no good, and "atoi" is no good, and
I wonder what is being used to print the text string that the atoi gets
fed.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-01-16 16:10:00
Subject: Re: Archive recovery crashes on win32 in HEAD - hot standby related?
Previous:From: Magnus HaganderDate: 2010-01-16 15:36:30
Subject: Re: pgsql: Fix one more cast for _open_osfhandle().

pgsql-committers by date

Next:From: Tom LaneDate: 2010-01-16 17:17:26
Subject: pgsql: Fix bogus initialization of KnownAssignedXids shared memory state
Previous:From: Magnus HaganderDate: 2010-01-16 15:36:30
Subject: Re: pgsql: Fix one more cast for _open_osfhandle().

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group