Re: [PATCH v2][next] Bluetooth: Avoid a couple dozen -Wflex-array-member-not-at-end warnings

Simon Horman
2025-09-10T10:25:33Z

On Tue, Sep 09, 2025 at 02:13:35PM +0200, Gustavo A. R. Silva wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
>
> Use the __struct_group() helper to fix 31 instances of the following
> type of warnings:
>
> 30 net/bluetooth/mgmt_config.c:16:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> 1 net/bluetooth/mgmt_config.c:22:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> Changes in v2:
> - Use __struct_group() instead of TRAILING_OVERLAP().
>
> v1:
> - Link: https://lore.kernel.org/linux-hardening/aLSCu8U62Hve7Dau@kspp/

Reviewed-by: Simon Horman <horms@kernel.org>