diff options
author | Matias Elo <matias.elo@nokia.com> | 2021-10-13 15:57:05 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2021-10-21 10:53:20 +0300 |
commit | d3b7ce4b060ff50e4a9ae285fe5e2bc62e940297 (patch) | |
tree | 699b841be32730b6f714cbf9ba1e714482522c9f /helper | |
parent | a0237360e745c02131b8e7e4316ae7e6caa22274 (diff) |
helper: fix zero-size array build errors
Fix "ISO C forbids zero-size array" errors when building with 'pedantic'
option.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'helper')
-rw-r--r-- | helper/cli.c | 2 | ||||
-rw-r--r-- | helper/hashtable.c | 2 | ||||
-rw-r--r-- | helper/include/odp/helper/ipsec.h | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/helper/cli.c b/helper/cli.c index 8dc6b66fa..e9ca2f783 100644 --- a/helper/cli.c +++ b/helper/cli.c @@ -47,7 +47,7 @@ typedef struct { odph_cli_param_t cli_param; struct sockaddr_in addr; uint32_t num_user_commands; - user_cmd_t user_cmd[0]; + user_cmd_t user_cmd[]; } cli_shm_t; static const char *shm_name = "_odp_cli"; diff --git a/helper/hashtable.c b/helper/hashtable.c index ac11acb15..39da586a8 100644 --- a/helper/hashtable.c +++ b/helper/hashtable.c @@ -40,7 +40,7 @@ typedef struct odph_hash_node { * its structure is like: * k_byte1 k_byte2...k_byten v_byte1...v_bytem */ - char content[0]; + char content[]; } odph_hash_node; typedef struct { diff --git a/helper/include/odp/helper/ipsec.h b/helper/include/odp/helper/ipsec.h index 1b2dbb77b..b149ce9ff 100644 --- a/helper/include/odp/helper/ipsec.h +++ b/helper/include/odp/helper/ipsec.h @@ -35,7 +35,7 @@ extern "C" { typedef struct ODP_PACKED { odp_u32be_t spi; /**< Security Parameter Index */ odp_u32be_t seq_no; /**< Sequence Number */ - uint8_t iv[0]; /**< Initialization vector */ + uint8_t iv[]; /**< Initialization vector */ } odph_esphdr_t; /** @internal Compile time assert */ @@ -48,7 +48,7 @@ ODP_STATIC_ASSERT(sizeof(odph_esphdr_t) == ODPH_ESPHDR_LEN, typedef struct ODP_PACKED { uint8_t pad_len; /**< Padding length (0-255) */ uint8_t next_header; /**< Next header protocol */ - uint8_t icv[0]; /**< Integrity Check Value (optional) */ + uint8_t icv[]; /**< Integrity Check Value (optional) */ } odph_esptrl_t; /** @internal Compile time assert */ @@ -64,7 +64,7 @@ typedef struct ODP_PACKED { odp_u16be_t pad; /**< Padding (must be 0) */ odp_u32be_t spi; /**< Security Parameter Index */ odp_u32be_t seq_no; /**< Sequence Number */ - uint8_t icv[0]; /**< Integrity Check Value */ + uint8_t icv[]; /**< Integrity Check Value */ } odph_ahhdr_t; /** @internal Compile time assert */ |