diff options
| author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2025-11-10 19:46:45 +0900 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-11-22 10:04:50 +0800 |
| commit | a26c23e0d679cbb0de91e96e6384daef2dcfd6c8 (patch) | |
| tree | 49398cd5b54dbe6021570e20bdaa9553daf0810b /kernel/locking/rtmutex_api.c | |
| parent | 8700ce07c5c6bf27afa7b59a8d9cf58d783a7d5c (diff) | |
KEYS: Avoid -Wflex-array-member-not-at-end warning
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Use the new TRAILING_OVERLAP() helper to fix the following warning:
crypto/asymmetric_keys/restrict.c:20:34: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
This helper creates a union between a flexible-array member (FAM) and a
set of MEMBERS that would otherwise follow it.
This overlays the trailing MEMBER unsigned char data[10]; onto the FAM
struct asymmetric_key_id::data[], while keeping the FAM and the start
of MEMBER aligned.
The static_assert() ensures this alignment remains, and it's
intentionally placed inmediately after the corresponding structures --no
blank line in between.
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Ignat Korchagin <ignat@cloudflare.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'kernel/locking/rtmutex_api.c')
0 files changed, 0 insertions, 0 deletions
