Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER member.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 33b2a2c97f3dd4cf8bbc2c020e34129886367b72
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2015-02-20T22:50:18Z
Releases: 9.5.0
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.

Files

PathChange+/−
src/backend/utils/adt/tsrank.c modified +17 −11
src/include/tsearch/ts_type.h modified +7 −0