pgsql: Fix one more cast for _open_osfhandle().

Started by Nonameabout 16 years ago4 messages
#1Noname
mha@postgresql.org

Log Message:
-----------
Fix one more cast for _open_osfhandle().

Tsutomu Yamada

Modified Files:
--------------
pgsql/src/backend/postmaster:
postmaster.c (r1.597 -> r1.598)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c?r1=1.597&r2=1.598)
syslogger.c (r1.53 -> r1.54)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/syslogger.c?r1=1.53&r2=1.54)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: pgsql: Fix one more cast for _open_osfhandle().

mha@postgresql.org (Magnus Hagander) writes:

Log Message:
-----------
Fix one more cast for _open_osfhandle().

If those are a problem then presumably syslogger_parseArgs needs work
too ... and I rather wonder where the value it's reading comes from.

regards, tom lane

#3Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#2)
Re: pgsql: Fix one more cast for _open_osfhandle().

2010/1/2 Tom Lane <tgl@sss.pgh.pa.us>:

mha@postgresql.org (Magnus Hagander) writes:

Log Message:
-----------
Fix one more cast for _open_osfhandle().

If those are a problem then presumably syslogger_parseArgs needs work
too ... and I rather wonder where the value it's reading comes from.

Late followup on this one.

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

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#3)
Re: [COMMITTERS] pgsql: Fix one more cast for _open_osfhandle().

Magnus Hagander <magnus@hagander.net> writes:

2010/1/2 Tom Lane <tgl@sss.pgh.pa.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