Re: [PATCHES] execl() sentinel

2007-07-18 Thread Alvaro Herrera
Chris Browne wrote: > [EMAIL PROTECTED] (Neil Conway) writes: > > On Wed, 2007-07-18 at 17:22 -0400, Alvaro Herrera wrote: > >> I wouldn't know how to look for other variadic functions using NULL > >> sentinels though. > > > > You would need something with more knowledge of C than "grep" has, at >

Re: [PATCHES] execl() sentinel

2007-07-18 Thread Chris Browne
[EMAIL PROTECTED] (Neil Conway) writes: > On Wed, 2007-07-18 at 17:22 -0400, Alvaro Herrera wrote: >> I wouldn't know how to look for other variadic functions using NULL >> sentinels though. > > You would need something with more knowledge of C than "grep" has, at > any rate. Perhaps you could teac

Re: [PATCHES] execl() sentinel

2007-07-18 Thread Neil Conway
On Wed, 2007-07-18 at 17:22 -0400, Alvaro Herrera wrote: > I wouldn't know how to look for other variadic functions using NULL > sentinels though. You would need something with more knowledge of C than "grep" has, at any rate. Perhaps you could teach sparse to do this analysis, if it can't do it a

Re: [PATCHES] execl() sentinel

2007-07-18 Thread Alvaro Herrera
Neil Conway wrote: > On Wed, 2007-07-18 at 16:59 +0200, Peter Eisentraut wrote: > > It might be good to check the actual definition of NULL in this case, > > however, > > before wondering further. > > Well, the existing coding is plainly wrong, regardless of the NULL > implementation used on any

Re: [PATCHES] execl() sentinel

2007-07-18 Thread Neil Conway
On Wed, 2007-07-18 at 16:59 +0200, Peter Eisentraut wrote: > It might be good to check the actual definition of NULL in this case, > however, > before wondering further. Well, the existing coding is plainly wrong, regardless of the NULL implementation used on any given machine (although it will

Re: [PATCHES] execl() sentinel

2007-07-18 Thread Peter Eisentraut
Am Mittwoch, 18. Juli 2007 17:16 schrieb Alvaro Herrera: > Peter Eisentraut wrote: > > Am Mittwoch, 18. Juli 2007 16:16 schrieb Tom Lane: > > > You should *not* have to inform the machine that NULL is a pointer. > > > > For variadic functions, that expectation is invalid, AFAIK. > > No, what's inva

Re: [PATCHES] execl() sentinel

2007-07-18 Thread Alvaro Herrera
Peter Eisentraut wrote: > Am Mittwoch, 18. Juli 2007 16:16 schrieb Tom Lane: > > You should *not* have to inform the machine that NULL is a pointer. > > For variadic functions, that expectation is invalid, AFAIK. No, what's invalid is that using an unadorned 0 is understood as a "null pointer" by

Re: [PATCHES] execl() sentinel

2007-07-18 Thread Peter Eisentraut
Am Mittwoch, 18. Juli 2007 16:16 schrieb Tom Lane: > You should *not* have to inform the machine that NULL is a pointer. For variadic functions, that expectation is invalid, AFAIK. It might be good to check the actual definition of NULL in this case, however, before wondering further. -- Peter

Re: [PATCHES] execl() sentinel

2007-07-18 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> It's too bad that gcc doesn't have a >> -Wno-snarkiness-about-system-headers-thank-you switch. > It does have a switch to *add* snarkiness about system headers, but does > not do it by default. > The problem in this case is that a

Re: [PATCHES] execl() sentinel

2007-07-17 Thread Peter Eisentraut
Tom Lane wrote: > It's too bad that gcc doesn't have a > -Wno-snarkiness-about-system-headers-thank-you switch. It does have a switch to *add* snarkiness about system headers, but does not do it by default. The problem in this case is that an uncast null pointer constant is not always a suffici

Re: [PATCHES] execl() sentinel

2007-07-17 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Alvaro Herrera wrote: >> pg_regress.c: In function `spawn_process': >> pg_regress.c:914: warning: missing sentinel in function call > You can apply this, but it sure seems like a compiler/include file bug > to me, even with the 64-bit explaination. Ther

Re: [PATCHES] execl() sentinel

2007-07-17 Thread Bruce Momjian
Alvaro Herrera wrote: > Stefan Kaltenbrunner just let me know via Jabber that there's a warning > in pg_regress.c: > > pg_regress.c: In function `spawn_process': > pg_regress.c:914: warning: missing sentinel in function call > > This small patch would seem to fix it, according to > http://www.li

[PATCHES] execl() sentinel

2007-07-11 Thread Alvaro Herrera
Stefan Kaltenbrunner just let me know via Jabber that there's a warning in pg_regress.c: pg_regress.c: In function `spawn_process': pg_regress.c:914: warning: missing sentinel in function call This small patch would seem to fix it, according to http://www.linuxonly.nl/docs/sentinel/ -- Alvar