From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kris Jurka <books(at)ejurka(dot)com> |
Cc: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, Gevik Babakhani <pgdev(at)xs4all(dot)nl>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: 2x compile warning |
Date: | 2006-04-24 21:39:30 |
Message-ID: | 6727.1145914770@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Kris Jurka <books(at)ejurka(dot)com> 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 \
>>
>> removes the warning. It seems silly for the GCC people to add warnings
>> for this kind of stuff without a simple way to bypass it...
> 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 that uses "if (ptr)" for a NULL-ness check.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-04-24 21:56:44 | Re: 2x compile warning |
Previous Message | Magnus Hagander | 2006-04-24 21:12:49 | Re: pgsql: Improve our private implementation of cbrt() to give results of |