pgsql: Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER membe - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER membe
Date
Msg-id E1YOwOt-0003WF-Rm@gemulon.postgresql.org
Whole thread Raw
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Use FLEXIBLE_ARRAY_MEMBER in some more places.
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Use FLEXIBLE_ARRAY_MEMBER in a bunch more places.