postgresql/src/include/executor
Tom Lane 09d8d110a6 Use FLEXIBLE_ARRAY_MEMBER in a bunch more places.
Replace some bogus "x[1]" declarations with "x[FLEXIBLE_ARRAY_MEMBER]".
Aside from being more self-documenting, this should help prevent bogus
warnings from static code analyzers and perhaps compiler misoptimizations.

This patch is just a down payment on eliminating the whole problem, but
it gets rid of a lot of easy-to-fix cases.

Note that the main problem with doing this is that one must no longer rely
on computing sizeof(the containing struct), since the result would be
compiler-dependent.  Instead use offsetof(struct, lastfield).  Autoconf
also warns against spelling that offsetof(struct, lastfield[0]).

Michael Paquier, review and additional fixes by me.
2015-02-20 00:11:42 -05:00
..
execdebug.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
execdesc.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
executor.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
functions.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
hashjoin.h Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
instrument.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeAgg.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeAppend.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeBitmapAnd.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeBitmapHeapscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeBitmapIndexscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeBitmapOr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeCtescan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeCustom.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeForeignscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeFunctionscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeGroup.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeHash.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeHashjoin.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeIndexonlyscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeIndexscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeLimit.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeLockRows.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeMaterial.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeMergeAppend.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeMergejoin.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeModifyTable.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeNestloop.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeRecursiveunion.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeResult.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeSeqscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeSetOp.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeSort.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeSubplan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeSubqueryscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeTidscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeUnique.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeValuesscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeWindowAgg.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeWorktablescan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
spi.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
spi_priv.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
tstoreReceiver.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
tuptable.h Update copyright for 2015 2015-01-06 11:43:47 -05:00