Обсуждение: pgsql: Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER membe

Поиск
Список
Период
Сортировка

pgsql: Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER membe

От
Tom Lane
Дата:
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(-)