Re: 2x compile warning
От
Martijn van Oosterhout
Тема
Re: 2x compile warning
Дата
Msg-id
20060424215644.GH2747@svana.org
Ответ на
Re: 2x compile warning (Tom Lane)
Список
Дерево обсуждения
2x compile warning Gevik Babakhani <pgdev@xs4all.nl>
Re: 2x compile warning Bruce Momjian <pgman@candle.pha.pa.us>
Re: 2x compile warning Kris Jurka <books@ejurka.com>
Re: 2x compile warning Martijn van Oosterhout <kleptog@svana.org>
Re: 2x compile warning Kris Jurka <books@ejurka.com>
Re: 2x compile warning Bruce Momjian <pgman@candle.pha.pa.us>
Re: 2x compile warning Kris Jurka <books@ejurka.com>
Re: 2x compile warning Bruce Momjian <pgman@candle.pha.pa.us>
Re: 2x compile warning Tom Lane <tgl@sss.pgh.pa.us>
Re: 2x compile warning Martijn van Oosterhout <kleptog@svana.org>
Re: 2x compile warning Tom Lane <tgl@sss.pgh.pa.us>
Re: 2x compile warning Bruce Momjian <pgman@candle.pha.pa.us>
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 http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
В списке pgsql-hackers по дате отправления