diff options
Diffstat (limited to 'src/include')
28 files changed, 57 insertions, 70 deletions
diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index 9bb0ba4b059..c1a2049d08f 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -322,7 +322,7 @@ typedef struct GinOptions { int32 vl_len_; /* varlena header (do not touch directly!) */ bool useFastUpdate; /* use fast updates? */ - int pendingListCleanupSize; /* maximum size of pending list */ + int pendingListCleanupSize; /* maximum size of pending list */ } GinOptions; #define GIN_DEFAULT_USE_FASTUPDATE true @@ -389,7 +389,7 @@ typedef struct { ItemPointerData first; /* first item in this posting list (unpacked) */ uint16 nbytes; /* number of bytes that follow */ - unsigned char bytes[1]; /* varbyte encoded items (variable length) */ + unsigned char bytes[FLEXIBLE_ARRAY_MEMBER]; /* varbyte encoded items */ } GinPostingList; #define SizeOfGinPostingList(plist) (offsetof(GinPostingList, bytes) + SHORTALIGN((plist)->nbytes) ) diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index 382826eb857..ce83042e177 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -47,7 +47,7 @@ typedef struct { BlockNumber prev; uint32 freespace; - char tupledata[1]; + char tupledata[FLEXIBLE_ARRAY_MEMBER]; } GISTNodeBufferPage; #define BUFFER_PAGE_DATA_OFFSET MAXALIGN(offsetof(GISTNodeBufferPage, tupledata)) @@ -131,7 +131,8 @@ typedef struct GISTSearchItem /* we must store parentlsn to detect whether a split occurred */ GISTSearchHeapItem heap; /* heap info, if heap tuple */ } data; - double distances[1]; /* array with numberOfOrderBys entries */ + double distances[FLEXIBLE_ARRAY_MEMBER]; /* numberOfOrderBys + * entries */ } GISTSearchItem; #define GISTSearchItemIsHeap(item) ((item).blkno == InvalidBlockNumber) @@ -144,7 +145,7 @@ typedef struct GISTSearchItem typedef struct GISTScanOpaqueData { GISTSTATE *giststate; /* index information, see above */ - pairingheap *queue; /* queue of unvisited items */ + pairingheap *queue; /* queue of unvisited items */ MemoryContext queueCxt; /* context holding the queue */ bool qual_ok; /* false if qual can never be satisfied */ bool firstCall; /* true until first gistgettuple call */ diff --git a/src/include/access/heapam_xlog.h b/src/include/access/heapam_xlog.h index a2ed2a058f7..f0f89dec0f2 100644 --- a/src/include/access/heapam_xlog.h +++ b/src/include/access/heapam_xlog.h @@ -132,7 +132,7 @@ typedef struct xl_heap_multi_insert { uint8 flags; uint16 ntuples; - OffsetNumber offsets[1]; + OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]; } xl_heap_multi_insert; #define SizeOfHeapMultiInsert offsetof(xl_heap_multi_insert, offsets) diff --git a/src/include/access/spgist_private.h b/src/include/access/spgist_private.h index f11d8ef490d..0492ef6114b 100644 --- a/src/include/access/spgist_private.h +++ b/src/include/access/spgist_private.h @@ -426,7 +426,7 @@ typedef struct spgxlogMoveLeafs * the dead tuple from the source *---------- */ - OffsetNumber offsets[1]; + OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]; } spgxlogMoveLeafs; #define SizeOfSpgxlogMoveLeafs offsetof(spgxlogMoveLeafs, offsets) @@ -534,7 +534,7 @@ typedef struct spgxlogPickSplit * list of leaf tuples, length nInsert (unaligned!) *---------- */ - OffsetNumber offsets[1]; + OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]; } spgxlogPickSplit; #define SizeOfSpgxlogPickSplit offsetof(spgxlogPickSplit, offsets) @@ -558,7 +558,7 @@ typedef struct spgxlogVacuumLeaf * tuple numbers to insert in nextOffset links *---------- */ - OffsetNumber offsets[1]; + OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]; } spgxlogVacuumLeaf; #define SizeOfSpgxlogVacuumLeaf offsetof(spgxlogVacuumLeaf, offsets) @@ -571,7 +571,7 @@ typedef struct spgxlogVacuumRoot spgxlogState stateSrc; /* offsets of tuples to delete follow */ - OffsetNumber offsets[1]; + OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]; } spgxlogVacuumRoot; #define SizeOfSpgxlogVacuumRoot offsetof(spgxlogVacuumRoot, offsets) @@ -583,7 +583,7 @@ typedef struct spgxlogVacuumRedirect TransactionId newestRedirectXid; /* newest XID of removed redirects */ /* offsets of redirect tuples to make placeholders follow */ - OffsetNumber offsets[1]; + OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]; } spgxlogVacuumRedirect; #define SizeOfSpgxlogVacuumRedirect offsetof(spgxlogVacuumRedirect, offsets) diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 8205504e6e7..d7e5f6447c9 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -118,7 +118,7 @@ typedef struct xl_xact_assignment { TransactionId xtop; /* assigned XID's top-level XID */ int nsubxacts; /* number of subtransaction XIDs */ - TransactionId xsub[1]; /* assigned subxids */ + TransactionId xsub[FLEXIBLE_ARRAY_MEMBER]; /* assigned subxids */ } xl_xact_assignment; #define MinSizeOfXactAssignment offsetof(xl_xact_assignment, xsub) @@ -128,7 +128,7 @@ typedef struct xl_xact_commit_compact TimestampTz xact_time; /* time of commit */ int nsubxacts; /* number of subtransaction XIDs */ /* ARRAY OF COMMITTED SUBTRANSACTION XIDs FOLLOWS */ - TransactionId subxacts[1]; /* VARIABLE LENGTH ARRAY */ + TransactionId subxacts[FLEXIBLE_ARRAY_MEMBER]; } xl_xact_commit_compact; #define MinSizeOfXactCommitCompact offsetof(xl_xact_commit_compact, subxacts) @@ -143,7 +143,7 @@ typedef struct xl_xact_commit Oid dbId; /* MyDatabaseId */ Oid tsId; /* MyDatabaseTableSpace */ /* Array of RelFileNode(s) to drop at commit */ - RelFileNode xnodes[1]; /* VARIABLE LENGTH ARRAY */ + RelFileNode xnodes[FLEXIBLE_ARRAY_MEMBER]; /* ARRAY OF COMMITTED SUBTRANSACTION XIDs FOLLOWS */ /* ARRAY OF SHARED INVALIDATION MESSAGES FOLLOWS */ } xl_xact_commit; @@ -171,7 +171,7 @@ typedef struct xl_xact_abort int nrels; /* number of RelFileNodes */ int nsubxacts; /* number of subtransaction XIDs */ /* Array of RelFileNode(s) to drop at abort */ - RelFileNode xnodes[1]; /* VARIABLE LENGTH ARRAY */ + RelFileNode xnodes[FLEXIBLE_ARRAY_MEMBER]; /* ARRAY OF ABORTED SUBTRANSACTION XIDs FOLLOWS */ } xl_xact_abort; diff --git a/src/include/c.h b/src/include/c.h index b1875209736..2de86f91416 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -424,8 +424,8 @@ typedef struct Oid elemtype; int dim1; int lbound1; - int16 values[1]; /* VARIABLE LENGTH ARRAY */ -} int2vector; /* VARIABLE LENGTH STRUCT */ + int16 values[FLEXIBLE_ARRAY_MEMBER]; +} int2vector; typedef struct { @@ -435,8 +435,8 @@ typedef struct Oid elemtype; int dim1; int lbound1; - Oid values[1]; /* VARIABLE LENGTH ARRAY */ -} oidvector; /* VARIABLE LENGTH STRUCT */ + Oid values[FLEXIBLE_ARRAY_MEMBER]; +} oidvector; /* * Representation of a Name: effectively just a C string, but null-padded to diff --git a/src/include/catalog/namespace.h b/src/include/catalog/namespace.h index d2e51986a6f..cf5f7d0a785 100644 --- a/src/include/catalog/namespace.h +++ b/src/include/catalog/namespace.h @@ -34,8 +34,8 @@ typedef struct _FuncCandidateList int nvargs; /* number of args to become variadic array */ int ndargs; /* number of defaulted args */ int *argnumbers; /* args' positional indexes, if named call */ - Oid args[1]; /* arg types --- VARIABLE LENGTH ARRAY */ -} *FuncCandidateList; /* VARIABLE LENGTH STRUCT */ + Oid args[FLEXIBLE_ARRAY_MEMBER]; /* arg types */ +} *FuncCandidateList; /* * Structure for xxxOverrideSearchPath functions diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h index cb7cc0e228a..4b60cdbedc6 100644 --- a/src/include/commands/dbcommands.h +++ b/src/include/commands/dbcommands.h @@ -22,21 +22,6 @@ #define XLOG_DBASE_CREATE 0x00 #define XLOG_DBASE_DROP 0x10 -typedef struct xl_dbase_create_rec_old -{ - /* Records copying of a single subdirectory incl. contents */ - Oid db_id; - char src_path[1]; /* VARIABLE LENGTH STRING */ - /* dst_path follows src_path */ -} xl_dbase_create_rec_old; - -typedef struct xl_dbase_drop_rec_old -{ - /* Records dropping of a single subdirectory incl. contents */ - Oid db_id; - char dir_path[1]; /* VARIABLE LENGTH STRING */ -} xl_dbase_drop_rec_old; - typedef struct xl_dbase_create_rec { /* Records copying of a single subdirectory incl. contents */ diff --git a/src/include/commands/tablespace.h b/src/include/commands/tablespace.h index e8b9bc407ca..70734d60301 100644 --- a/src/include/commands/tablespace.h +++ b/src/include/commands/tablespace.h @@ -25,7 +25,7 @@ typedef struct xl_tblspc_create_rec { Oid ts_id; - char ts_path[1]; /* VARIABLE LENGTH STRING */ + char ts_path[FLEXIBLE_ARRAY_MEMBER]; /* null-terminated string */ } xl_tblspc_create_rec; typedef struct xl_tblspc_drop_rec diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h index e79df715dee..71099b15bbc 100644 --- a/src/include/executor/hashjoin.h +++ b/src/include/executor/hashjoin.h @@ -114,7 +114,7 @@ typedef struct HashMemoryChunkData struct HashMemoryChunkData *next; /* pointer to the next chunk (linked list) */ - char data[1]; /* buffer allocated at the end */ + char data[FLEXIBLE_ARRAY_MEMBER]; /* buffer allocated at the end */ } HashMemoryChunkData; typedef struct HashMemoryChunkData *HashMemoryChunk; diff --git a/src/include/nodes/bitmapset.h b/src/include/nodes/bitmapset.h index 5f45f4dbf36..3a556eed0ac 100644 --- a/src/include/nodes/bitmapset.h +++ b/src/include/nodes/bitmapset.h @@ -32,8 +32,8 @@ typedef int32 signedbitmapword; /* must be the matching signed type */ typedef struct Bitmapset { int nwords; /* number of words in array */ - bitmapword words[1]; /* really [nwords] */ -} Bitmapset; /* VARIABLE LENGTH STRUCT */ + bitmapword words[FLEXIBLE_ARRAY_MEMBER]; /* really [nwords] */ +} Bitmapset; /* result of bms_subset_compare */ diff --git a/src/include/nodes/params.h b/src/include/nodes/params.h index 5b096c54b58..a0f7dd0c555 100644 --- a/src/include/nodes/params.h +++ b/src/include/nodes/params.h @@ -71,7 +71,7 @@ typedef struct ParamListInfoData ParserSetupHook parserSetup; /* parser setup hook */ void *parserSetupArg; int numParams; /* number of ParamExternDatas following */ - ParamExternData params[1]; /* VARIABLE LENGTH ARRAY */ + ParamExternData params[FLEXIBLE_ARRAY_MEMBER]; } ParamListInfoData; diff --git a/src/include/nodes/tidbitmap.h b/src/include/nodes/tidbitmap.h index fb62c9e683c..cfba64b0c5f 100644 --- a/src/include/nodes/tidbitmap.h +++ b/src/include/nodes/tidbitmap.h @@ -41,8 +41,8 @@ typedef struct int ntuples; /* -1 indicates lossy result */ bool recheck; /* should the tuples be rechecked? */ /* Note: recheck is always true if ntuples < 0 */ - OffsetNumber offsets[1]; /* VARIABLE LENGTH ARRAY */ -} TBMIterateResult; /* VARIABLE LENGTH STRUCT */ + OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]; +} TBMIterateResult; /* function prototypes in nodes/tidbitmap.c */ diff --git a/src/include/postgres.h b/src/include/postgres.h index 082c75b0935..cbb7f796e1e 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -117,20 +117,20 @@ typedef union struct /* Normal varlena (4-byte length) */ { uint32 va_header; - char va_data[1]; + char va_data[FLEXIBLE_ARRAY_MEMBER]; } va_4byte; struct /* Compressed-in-line format */ { uint32 va_header; uint32 va_rawsize; /* Original data size (excludes header) */ - char va_data[1]; /* Compressed data */ + char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */ } va_compressed; } varattrib_4b; typedef struct { uint8 va_header; - char va_data[1]; /* Data begins here */ + char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Data begins here */ } varattrib_1b; /* TOAST pointers are a subset of varattrib_1b with an identifying tag byte */ @@ -138,7 +138,7 @@ typedef struct { uint8 va_header; /* Always 0x80 or 0x01 */ uint8 va_tag; /* Type of datum */ - char va_data[1]; /* Data (of the type indicated by va_tag) */ + char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Type-specific data */ } varattrib_1b_e; /* diff --git a/src/include/postmaster/syslogger.h b/src/include/postmaster/syslogger.h index 602b13c0976..89a535c18fd 100644 --- a/src/include/postmaster/syslogger.h +++ b/src/include/postmaster/syslogger.h @@ -48,7 +48,7 @@ typedef struct int32 pid; /* writer's pid */ char is_last; /* last chunk of message? 't' or 'f' ('T' or * 'F' for CSV case) */ - char data[1]; /* data payload starts here */ + char data[FLEXIBLE_ARRAY_MEMBER]; /* data payload starts here */ } PipeProtoHeader; typedef union diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h index 88677506f34..40351da47fd 100644 --- a/src/include/replication/walsender_private.h +++ b/src/include/replication/walsender_private.h @@ -54,7 +54,7 @@ typedef struct WalSnd * Pointer to the walsender's latch. Used by backends to wake up this * walsender when it has work to do. NULL if the walsender isn't active. */ - Latch *latch; + Latch *latch; /* * The priority order of the standby managed by this WALSender, as listed @@ -88,7 +88,7 @@ typedef struct */ bool sync_standbys_defined; - WalSnd walsnds[1]; /* VARIABLE LENGTH ARRAY */ + WalSnd walsnds[FLEXIBLE_ARRAY_MEMBER]; } WalSndCtlData; extern WalSndCtlData *WalSndCtl; diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index f6930327249..c2fbffc8e9b 100644 --- a/src/include/storage/bufpage.h +++ b/src/include/storage/bufpage.h @@ -156,7 +156,7 @@ typedef struct PageHeaderData LocationIndex pd_special; /* offset to start of special space */ uint16 pd_pagesize_version; TransactionId pd_prune_xid; /* oldest prunable XID, or zero if none */ - ItemIdData pd_linp[1]; /* beginning of line pointer array */ + ItemIdData pd_linp[FLEXIBLE_ARRAY_MEMBER]; /* line pointer array */ } PageHeaderData; typedef PageHeaderData *PageHeader; diff --git a/src/include/storage/fsm_internals.h b/src/include/storage/fsm_internals.h index 1decd901331..26340b4b2e4 100644 --- a/src/include/storage/fsm_internals.h +++ b/src/include/storage/fsm_internals.h @@ -39,7 +39,7 @@ typedef struct * NonLeafNodesPerPage elements are upper nodes, and the following * LeafNodesPerPage elements are leaf nodes. Unused nodes are zero. */ - uint8 fp_nodes[1]; + uint8 fp_nodes[FLEXIBLE_ARRAY_MEMBER]; } FSMPageData; typedef FSMPageData *FSMPage; diff --git a/src/include/storage/standby.h b/src/include/storage/standby.h index c32c96379c3..7626c4c4f4b 100644 --- a/src/include/storage/standby.h +++ b/src/include/storage/standby.h @@ -60,7 +60,7 @@ extern void StandbyReleaseOldLocks(int nxids, TransactionId *xids); typedef struct xl_standby_locks { int nlocks; /* number of entries in locks array */ - xl_standby_lock locks[1]; /* VARIABLE LENGTH ARRAY */ + xl_standby_lock locks[FLEXIBLE_ARRAY_MEMBER]; } xl_standby_locks; /* @@ -75,7 +75,7 @@ typedef struct xl_running_xacts TransactionId oldestRunningXid; /* *not* oldestXmin */ TransactionId latestCompletedXid; /* so we can set xmax */ - TransactionId xids[1]; /* VARIABLE LENGTH ARRAY */ + TransactionId xids[FLEXIBLE_ARRAY_MEMBER]; } xl_running_xacts; #define MinSizeOfXactRunningXacts offsetof(xl_running_xacts, xids) diff --git a/src/include/tsearch/dicts/regis.h b/src/include/tsearch/dicts/regis.h index 081a502d695..ddf5b605c44 100644 --- a/src/include/tsearch/dicts/regis.h +++ b/src/include/tsearch/dicts/regis.h @@ -21,7 +21,7 @@ typedef struct RegisNode len:16, unused:14; struct RegisNode *next; - unsigned char data[1]; + unsigned char data[FLEXIBLE_ARRAY_MEMBER]; } RegisNode; #define RNHDRSZ (offsetof(RegisNode,data)) diff --git a/src/include/tsearch/dicts/spell.h b/src/include/tsearch/dicts/spell.h index a75552bbebc..e512532f8e8 100644 --- a/src/include/tsearch/dicts/spell.h +++ b/src/include/tsearch/dicts/spell.h @@ -49,7 +49,7 @@ typedef struct typedef struct SPNode { uint32 length; - SPNodeData data[1]; + SPNodeData data[FLEXIBLE_ARRAY_MEMBER]; } SPNode; #define SPNHDRSZ (offsetof(SPNode,data)) @@ -70,7 +70,7 @@ typedef struct spell_struct int len; } d; } p; - char word[1]; /* variable length, null-terminated */ + char word[FLEXIBLE_ARRAY_MEMBER]; } SPELL; #define SPELLHDRSZ (offsetof(SPELL, word)) @@ -120,7 +120,7 @@ typedef struct AffixNode { uint32 isvoid:1, length:31; - AffixNodeData data[1]; + AffixNodeData data[FLEXIBLE_ARRAY_MEMBER]; } AffixNode; #define ANHRDSZ (offsetof(AffixNode, data)) diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h index 1cdfa82fb07..ce919a2c665 100644 --- a/src/include/tsearch/ts_type.h +++ b/src/include/tsearch/ts_type.h @@ -63,7 +63,7 @@ typedef uint16 WordEntryPos; typedef struct { uint16 npos; - WordEntryPos pos[1]; /* variable length */ + WordEntryPos pos[FLEXIBLE_ARRAY_MEMBER]; } WordEntryPosVector; @@ -82,7 +82,7 @@ typedef struct { int32 vl_len_; /* varlena header (do not touch directly!) */ int32 size; - WordEntry entries[1]; /* variable length */ + WordEntry entries[FLEXIBLE_ARRAY_MEMBER]; /* lexemes follow the entries[] array */ } TSVectorData; @@ -233,7 +233,7 @@ typedef struct { int32 vl_len_; /* varlena header (do not touch directly!) */ int32 size; /* number of QueryItems */ - char data[1]; /* data starts here */ + char data[FLEXIBLE_ARRAY_MEMBER]; /* data starts here */ } TSQueryData; typedef TSQueryData *TSQuery; diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index 80847853546..a3a699c2fa0 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -147,8 +147,8 @@ typedef struct catclist uint32 hash_value; /* hash value for lookup keys */ HeapTupleData tuple; /* header for tuple holding keys */ int n_members; /* number of member tuples */ - CatCTup *members[1]; /* members --- VARIABLE LENGTH ARRAY */ -} CatCList; /* VARIABLE LENGTH STRUCT */ + CatCTup *members[FLEXIBLE_ARRAY_MEMBER]; /* members */ +} CatCList; typedef struct catcacheheader diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index 8912ba53bff..6b8ab3c6564 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -219,7 +219,7 @@ typedef struct TimeZoneAbbrevTable { Size tblsize; /* size in bytes of TimeZoneAbbrevTable */ int numabbrevs; /* number of entries in abbrevs[] array */ - datetkn abbrevs[1]; /* VARIABLE LENGTH ARRAY */ + datetkn abbrevs[FLEXIBLE_ARRAY_MEMBER]; /* DynamicZoneAbbrev(s) may follow the abbrevs[] array */ } TimeZoneAbbrevTable; @@ -227,7 +227,7 @@ typedef struct TimeZoneAbbrevTable typedef struct DynamicZoneAbbrev { pg_tz *tz; /* NULL if not yet looked up */ - char zone[1]; /* zone name (var length, NUL-terminated) */ + char zone[FLEXIBLE_ARRAY_MEMBER]; /* NUL-terminated zone name */ } DynamicZoneAbbrev; diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h index 0b6d3c32d1d..8da6c6c987b 100644 --- a/src/include/utils/geo_decls.h +++ b/src/include/utils/geo_decls.h @@ -80,7 +80,7 @@ typedef struct int32 npts; int32 closed; /* is this a closed polygon? */ int32 dummy; /* padding to make it double align */ - Point p[1]; /* variable length array of POINTs */ + Point p[FLEXIBLE_ARRAY_MEMBER]; } PATH; @@ -115,7 +115,7 @@ typedef struct int32 vl_len_; /* varlena header (do not touch directly!) */ int32 npts; BOX boundbox; - Point p[1]; /* variable length array of POINTs */ + Point p[FLEXIBLE_ARRAY_MEMBER]; } POLYGON; /*--------------------------------------------------------------------- diff --git a/src/include/utils/jsonb.h b/src/include/utils/jsonb.h index 887eb9b7953..9d1770e4c94 100644 --- a/src/include/utils/jsonb.h +++ b/src/include/utils/jsonb.h @@ -194,7 +194,7 @@ typedef struct JsonbContainer { uint32 header; /* number of elements or key/value pairs, and * flags */ - JEntry children[1]; /* variable length */ + JEntry children[FLEXIBLE_ARRAY_MEMBER]; /* the data for each child node follows. */ } JsonbContainer; diff --git a/src/include/utils/relmapper.h b/src/include/utils/relmapper.h index 420310d6fc6..73b4905e3b1 100644 --- a/src/include/utils/relmapper.h +++ b/src/include/utils/relmapper.h @@ -29,7 +29,7 @@ typedef struct xl_relmap_update Oid dbid; /* database ID, or 0 for shared map */ Oid tsid; /* database's tablespace, or pg_global */ int32 nbytes; /* size of relmap data */ - char data[1]; /* VARIABLE LENGTH ARRAY */ + char data[FLEXIBLE_ARRAY_MEMBER]; } xl_relmap_update; #define MinSizeOfRelmapUpdate offsetof(xl_relmap_update, data) diff --git a/src/include/utils/varbit.h b/src/include/utils/varbit.h index 8afc3b1a6ae..da55e7d0318 100644 --- a/src/include/utils/varbit.h +++ b/src/include/utils/varbit.h @@ -26,7 +26,8 @@ typedef struct { int32 vl_len_; /* varlena header (do not touch directly!) */ int32 bit_len; /* number of valid bits */ - bits8 bit_dat[1]; /* bit string, most sig. byte first */ + bits8 bit_dat[FLEXIBLE_ARRAY_MEMBER]; /* bit string, most sig. byte + * first */ } VarBit; /* |