Messages in this thread | | | Date | Mon, 6 Nov 2023 19:43:21 -0500 | From | Kent Overstreet <> | Subject | Re: [PATCH][next] bcachefs: Use DECLARE_FLEX_ARRAY() helper and fix multiple -Warray-bounds warnings |
| |
On Mon, Nov 06, 2023 at 04:27:02PM -0600, Gustavo A. R. Silva wrote: > Transform zero-length array `s` into a proper flexible-array > member in `struct snapshot_table` via the DECLARE_FLEX_ARRAY() > helper; and fix tons of the following -Warray-bounds warnings: > > fs/bcachefs/snapshot.h:36:21: warning: array subscript <unknown> is outside array bounds of 'struct snapshot_t[0]' [-Warray-bounds=] > fs/bcachefs/snapshot.h:36:21: warning: array subscript <unknown> is outside array bounds of 'struct snapshot_t[0]' [-Warray-bounds=] > fs/bcachefs/snapshot.c:135:70: warning: array subscript <unknown> is outside array bounds of 'struct snapshot_t[0]' [-Warray-bounds=] > fs/bcachefs/snapshot.h:36:21: warning: array subscript <unknown> is outside array bounds of 'struct snapshot_t[0]' [-Warray-bounds=] > fs/bcachefs/snapshot.h:36:21: warning: array subscript <unknown> is outside array bounds of 'struct snapshot_t[0]' [-Warray-bounds=] > fs/bcachefs/snapshot.h:36:21: warning: array subscript <unknown> is outside array bounds of 'struct snapshot_t[0]' [-Warray-bounds=] > > This helps with the ongoing efforts to globally enable -Warray-bounds. > > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Thanks, applied
| |