[v5,6/6] table: replace zero length array with flex array
Checks
Commit Message
Zero length arrays are GNU extension. Replace with
standard flex array.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/table/rte_table_acl.c | 2 +-
lib/table/rte_table_array.c | 2 +-
lib/table/rte_table_hash_cuckoo.c | 2 +-
lib/table/rte_table_hash_ext.c | 2 +-
lib/table/rte_table_hash_key16.c | 2 +-
lib/table/rte_table_hash_key32.c | 2 +-
lib/table/rte_table_hash_key8.c | 2 +-
lib/table/rte_table_hash_lru.c | 2 +-
lib/table/rte_table_lpm.c | 2 +-
lib/table/rte_table_lpm_ipv6.c | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
@@ -48,7 +48,7 @@ struct rte_table_acl {
uint8_t *acl_rule_memory; /* Memory to store the rules */
/* Memory to store the action table and stack of free entries */
- alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[];
};
@@ -40,7 +40,7 @@ struct __rte_cache_aligned rte_table_array {
uint32_t entry_pos_mask;
/* Internal table */
- alignas(RTE_CACHE_LINE_SIZE) uint8_t array[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t array[];
};
static void *
@@ -44,7 +44,7 @@ struct rte_table_hash {
struct rte_hash *h_table;
/* Lookup table */
- alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[];
};
static int
@@ -100,7 +100,7 @@ struct rte_table_hash {
uint32_t *bkt_ext_stack;
/* Table memory */
- alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[];
};
static int
@@ -85,7 +85,7 @@ struct rte_table_hash {
uint32_t *stack;
/* Lookup table */
- alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[];
};
static int
@@ -85,7 +85,7 @@ struct rte_table_hash {
uint32_t *stack;
/* Lookup table */
- alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[];
};
static int
@@ -81,7 +81,7 @@ struct rte_table_hash {
uint32_t *stack;
/* Lookup table */
- alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[];
};
static int
@@ -77,7 +77,7 @@ struct rte_table_hash {
uint32_t *key_stack;
/* Table memory */
- alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t memory[];
};
static int
@@ -48,7 +48,7 @@ struct rte_table_lpm {
/* Next Hop Table (NHT) */
uint32_t nht_users[RTE_TABLE_LPM_MAX_NEXT_HOPS];
- alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[];
};
static void *
@@ -45,7 +45,7 @@ struct rte_table_lpm_ipv6 {
/* Next Hop Table (NHT) */
uint32_t nht_users[RTE_TABLE_LPM_MAX_NEXT_HOPS];
- alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t nht[];
};
static void *