[HACKERS] 2x compile warning

2006-04-24 Thread Gevik Babakhani
I noticed the following compile warnings. Perhaps someone is interested to know about them. /usr/bin/flex -o'pgc.c' pgc.l gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g -Wno-error -I./../include -I.

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Kris Jurka
On Mon, 24 Apr 2006, Gevik Babakhani wrote: I noticed the following compile warnings. Perhaps someone is interested to know about them. Also I was testing a gcc 4.2 snapshot (20060419) and it has a whole lot of warnings stemming from heap_getattr's isnull check: aclchk.c:791: warning:

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Tom Lane
Kris Jurka [EMAIL PROTECTED] writes: Also I was testing a gcc 4.2 snapshot (20060419) and it has a whole lot of warnings stemming from heap_getattr's isnull check: aclchk.c:791: warning: the address of 'isNull', will always evaluate as 'true' We need to lobby the gcc maintainers to not give

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Bruce Momjian
Gevik Babakhani wrote: I noticed the following compile warnings. Perhaps someone is interested to know about them. /usr/bin/flex -o'pgc.c' pgc.l gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g -Wno-error

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Bruce Momjian
Tom Lane wrote: Kris Jurka [EMAIL PROTECTED] writes: Also I was testing a gcc 4.2 snapshot (20060419) and it has a whole lot of warnings stemming from heap_getattr's isnull check: aclchk.c:791: warning: the address of 'isNull', will always evaluate as 'true' We need to lobby the gcc

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Martijn van Oosterhout
On Mon, Apr 24, 2006 at 01:16:04PM -0500, Kris Jurka wrote: On Mon, 24 Apr 2006, Gevik Babakhani wrote: I noticed the following compile warnings. Perhaps someone is interested to know about them. Also I was testing a gcc 4.2 snapshot (20060419) and it has a whole lot of warnings

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Kris Jurka
On Mon, 24 Apr 2006, Martijn van Oosterhout wrote: Perhaps someone could check if changing the test explicitly check against NULL: ((attnum) (int) (tup)-t_data-t_natts) ? \ ( \ (((isnull) != NULL)? (*(isnull) = true) : (dummyret)NULL), \

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Tom Lane
Kris Jurka [EMAIL PROTECTED] writes: On Mon, 24 Apr 2006, Martijn van Oosterhout wrote: Perhaps someone could check if changing the test explicitly check against NULL: ((attnum) (int) (tup)-t_data-t_natts) ? \ ( \ (((isnull) != NULL)? (*(isnull) = true) : (dummyret)NULL), \ (Datum)NULL \

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Martijn van Oosterhout
On Mon, Apr 24, 2006 at 05:39:30PM -0400, Tom Lane wrote: Yes, this coding removes the warning. Oh, good, that seems like a reasonable change to make (it's arguably more clear than the original anyway). Is this the only place where the warning shows up? ISTM there's quite a lot of code

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Bruce Momjian
Kris Jurka wrote: On Mon, 24 Apr 2006, Martijn van Oosterhout wrote: Perhaps someone could check if changing the test explicitly check against NULL: ((attnum) (int) (tup)-t_data-t_natts) ? \ ( \ (((isnull) != NULL)? (*(isnull) = true) :

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Kris Jurka
On Mon, 24 Apr 2006, Bruce Momjian wrote: Great, fix attached and applied. You also need to change lines 48 and 64 of heapam.h to use the same coding. Kris Jurka ---(end of broadcast)--- TIP 5: don't forget to increase your free space map

Re: [HACKERS] 2x compile warning

2006-04-24 Thread Bruce Momjian
Kris Jurka wrote: On Mon, 24 Apr 2006, Bruce Momjian wrote: Great, fix attached and applied. You also need to change lines 48 and 64 of heapam.h to use the same coding. Done. -- Bruce Momjian http://candle.pha.pa.us EnterpriseDBhttp://www.enterprisedb.com + If your