Re: Windows build warnings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Windows build warnings
Дата
Msg-id 3700883.1637595648@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Windows build warnings  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: Windows build warnings  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes:
> Fair enough.  Looking at where we use PG_USED_FOR_ASSERTS_ONLY (and where it
> works), these two warnings are the only places where we apply it to a pointer
> typedef (apart from one place where the variable is indeed used outside of
> asserts).  Since it clearly works in all other cases, I wonder if something
> like the below sketch could make MSVC handle the attribute?

Ugh.  If we're changing the code anyway, I think I prefer Greg's original
patch; it's at least not randomly inconsistent with everything else.

However ... I question your assumption that it works everywhere else.
I can't find anything that is providing a non-empty definition of
PG_USED_FOR_ASSERTS_ONLY (a/k/a pg_attribute_unused) for anything
except GCC.  It seems likely to me that MSVC simply fails to produce
such warnings in most places, but it's woken up and done so here.

            regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: small change to comment for ATExecDetachPartition
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: logical decoding and replication of sequences