[PATCH] hash: replace zero length array

fengchengwen fengchengwen at huawei.com
Thu Aug 21 02:42:49 CEST 2025


Acked-by: Chengwen Feng <fengchengwen at huawei.com>

On 8/21/2025 5:19 AM, Stephen Hemminger wrote:
> Zero-length arrays are a GNU C extension and instead use the ISO C99
> flexible array member.
> 
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
>  lib/hash/rte_cuckoo_hash.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h
> index 26a992419a..cf5cd29144 100644
> --- a/lib/hash/rte_cuckoo_hash.h
> +++ b/lib/hash/rte_cuckoo_hash.h
> @@ -131,7 +131,7 @@ struct rte_hash_key {
>  		RTE_ATOMIC(void *) pdata;
>  	};
>  	/* Variable key size */
> -	char key[0];
> +	char key[];
>  };
>  
>  /** Bucket structure */



More information about the dev mailing list