Re: pgsql: Silence compiler warning on win32.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Silence compiler warning on win32.
Дата
Msg-id 15865.1233072455@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Silence compiler warning on win32.  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-committers
Magnus Hagander <magnus@hagander.net> writes:
> Tom Lane wrote:
>> Surely this patch is wrong.  It is suppressing, not fixing, a critical
>> warning about a datatype mismatch.

> You mean the signed vs unsigned part? Other than that, int and dword are
> always the same on win32...

Hmm, need more caffeine I guess.  I was thinking dword == long.  But in
any case, I'd feel a lot more comfortable if the patch ifdef'd the
declaration of exit_status to match, rather than forcing a cast of the
pointer value.  Just a couple weeks ago I wasted a great deal of time
finding a bug that was created by someone overriding this exact type of
compiler warning with a cast to something that *wasn't* binary
compatible.  (It worked fine on the author's machine, of course, but
not so much on one with a different sizeof long...)

            regards, tom lane

В списке pgsql-committers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: pgsql: Silence compiler warning on win32.
Следующее
От: mkz@pgfoundry.org (User Mkz)
Дата:
Сообщение: pgbouncer - pgbouncer: duh, seems we did not include COPYRIGHT file in