]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: Avoid -Wflex-array-member-not-at-end warnings
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 30 Apr 2025 19:22:01 +0000 (13:22 -0600)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 22 May 2025 00:14:38 +0000 (20:14 -0400)
commitae0386e111253eee0f71ae3f32635a3ba22e5a7b
treebb874bf79aef708127079de43114f2351c32fd13
parent98e5e36d8c58ab41c28367d3bfc9ec4e8795e421
bcachefs: Avoid -Wflex-array-member-not-at-end warnings

-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.

Refactor a couple of structs that contain flexible arrays in the
middle by replacing them with unions.

So, with these changes, fix the following warnings:

fs/bcachefs/disk_accounting.c:429:51: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
fs/bcachefs/ec_types.h:8:41: 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>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/disk_accounting.c
fs/bcachefs/ec_types.h
fs/bcachefs/journal_io.c
fs/bcachefs/journal_reclaim.c