Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> Reviewed-by: Morten Brørup <m...@smartsharesystems.com> Acked-by: Chengwen Feng <fengcheng...@huawei.com> Acked-by: Stephen Hemminger <step...@networkplumber.org> --- lib/rcu/rcu_qsbr_pvt.h | 2 +- lib/rcu/rte_rcu_qsbr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/rcu/rcu_qsbr_pvt.h b/lib/rcu/rcu_qsbr_pvt.h index 5fd7ca2..96d05e6 100644 --- a/lib/rcu/rcu_qsbr_pvt.h +++ b/lib/rcu/rcu_qsbr_pvt.h @@ -52,7 +52,7 @@ struct rte_rcu_qsbr_dq { */ typedef struct { uint64_t token; /**< Token */ - uint8_t elem[0]; /**< Pointer to user element */ + uint8_t elem[]; /**< Pointer to user element */ } __attribute__((__may_alias__)) __rte_rcu_qsbr_dq_elem_t; #endif /* _RTE_RCU_QSBR_PVT_H_ */ diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index e7ef788..af9cbea 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -106,7 +106,7 @@ struct rte_rcu_qsbr { uint32_t max_threads; /**< Maximum number of threads using this QS variable */ - struct rte_rcu_qsbr_cnt qsbr_cnt[0] __rte_cache_aligned; + struct rte_rcu_qsbr_cnt qsbr_cnt[] __rte_cache_aligned; /**< Quiescent state counter array of 'max_threads' elements */ /**< Registered thread IDs are stored in a bitmap array, -- 1.8.3.1