Use C99 flexible array member notation in parser memory struct (#4592)

The usage of a single byte sized array as a flexible array member can lead to
compiler/analyzer errors or warnings. Not specifying the size in the array is
correct as per C99 standard.

Flexible array members are defined in the C Standard, 6.7.2.1 (ISO/IEC 9899:1999).

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
Péter Gál
2021-02-11 14:18:35 +01:00
committed by GitHub
parent a9c83020df
commit a95a0b3539
+1 -1
View File
@@ -330,7 +330,7 @@ typedef struct
typedef struct parser_mem_page_t
{
struct parser_mem_page_t *next_p; /**< next page */
uint8_t bytes[1]; /**< memory bytes */
uint8_t bytes[]; /**< memory bytes, C99 flexible array member */
} parser_mem_page_t;
/**