Replace GNU zero-length array with ISO C99 flexible array member

This commit is contained in:
James R 2022-02-20 03:10:04 -08:00
parent cd5946be73
commit bea79dfa65
4 changed files with 6 additions and 6 deletions

View file

@ -212,7 +212,7 @@ typedef struct
UINT8 iteration;
UINT32 position;
UINT16 size;
UINT8 data[0]; // Size is variable using hardware_MAXPACKETLENGTH
UINT8 data[]; // Size is variable using hardware_MAXPACKETLENGTH
} ATTRPACK filetx_pak;
typedef struct
@ -226,7 +226,7 @@ typedef struct
UINT8 fileid;
UINT8 iteration;
UINT8 numsegments;
fileacksegment_t segments[0];
fileacksegment_t segments[];
} ATTRPACK fileack_pak;
#ifdef _MSC_VER

View file

@ -48,7 +48,7 @@ typedef struct
typedef struct
{
INT32 numpts;
polyvertex_t pts[0];
polyvertex_t pts[];
} poly_t;
#ifdef _MSC_VER
@ -140,4 +140,4 @@ void HWR_SetPalette(RGBA_t *palette);
extern INT32 patchformat;
extern INT32 textureformat;
#endif //_HW_GLOB_
#endif //_HW_GLOB_

View file

@ -718,7 +718,7 @@ typedef struct
UINT8 mode; // see pic_mode_t above
INT16 height;
INT16 reserved1; // set to 0
UINT8 data[0];
UINT8 data[];
} ATTRPACK pic_t;
#ifdef _MSC_VER

View file

@ -63,7 +63,7 @@ typedef struct
// All the patches[patchcount] are drawn back to front into the cached texture.
INT16 patchcount;
texpatch_t patches[0];
texpatch_t patches[];
} texture_t;
// all loaded and prepared textures from the start of the game