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 that uses "if (ptr)" for a NULL-ness check.

But very little code of the form "if (&local_var)" which is always true
and what causes the problem here. I think this is just a variation on
the compiler test for "if (i=1)" which is also always true but probably
a bug. That warning you avoid with an extra set of parenthesis.

I'd be surprised if there were many other issues here, only complex
macros are likely to cause this one.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to 
> litigate.

Attachment: signature.asc
Description: Digital signature

Reply via email to