pgsql: Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER membe

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER membe
Дата
Msg-id E1YOwOt-0003WF-Rm@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER member.

clang complains about this, not unreasonably, so define another struct
that's explicitly for a WordEntryPos with exactly one element.

While at it, get rid of pretty dubious use of a static variable for
more than one purpose --- if it were being treated as const maybe
I'd be okay with this, but it isn't.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/33b2a2c97f3dd4cf8bbc2c020e34129886367b72

Modified Files
--------------
src/backend/utils/adt/tsrank.c |   28 +++++++++++++++++-----------
src/include/tsearch/ts_type.h  |    7 +++++++
2 files changed, 24 insertions(+), 11 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Use FLEXIBLE_ARRAY_MEMBER in some more places.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Use FLEXIBLE_ARRAY_MEMBER in a bunch more places.