[2/2] rcu: 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>
---
lib/rcu/rcu_qsbr_pvt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Tyler Retzlaff <roretzla@linux.microsoft.com>
> Sent: Wednesday, January 24, 2024 4:18 PM
> To: dev@dpdk.org
> Cc: Bruce Richardson <bruce.richardson@intel.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Sameh Gobriel
> <sameh.gobriel@intel.com>; Vladimir Medvedkin
> <vladimir.medvedkin@intel.com>; Yipeng Wang <yipeng1.wang@intel.com>;
> Stephen Hemminger <stephen@networkplumber.org>; Tyler Retzlaff
> <roretzla@linux.microsoft.com>
> Subject: [PATCH 2/2] rcu: replace zero length array with flex array
>
> 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>
> ---
> lib/rcu/rcu_qsbr_pvt.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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_ */
> --
> 1.8.3.1
> From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com]
> Sent: Wednesday, 24 January 2024 23.18
lex array
>
> 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>
@@ -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_ */