[v2,2/4] rcu: replace zero length array with flex array

Message ID 1707777366-26000-3-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series more replacement of zero length array |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Feb. 12, 2024, 10:36 p.m. UTC
  Zero length arrays are GNU extension. Replace with
standard flex array.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/rcu/rcu_qsbr_pvt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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_ */