diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-31 23:05:22 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-04 19:17:11 +0100 |
commit | 6dfa10ab22a6a322269a3454d7ac720dc2f8bf11 (patch) | |
tree | e27926b981d8aa5eb8f282747d34c11e55f0f4db /fs/bcachefs/btree_update_interior.h | |
parent | bcachefs: Fix MEAN_AND_VARIANCE kconfig options (diff) | |
download | linux-6dfa10ab22a6a322269a3454d7ac720dc2f8bf11.tar.xz linux-6dfa10ab22a6a322269a3454d7ac720dc2f8bf11.zip |
bcachefs: Fix build errors with gcc 10
gcc 10 seems to complain about array bounds in situations where gcc 11
does not - curious.
This unfortunately requires adding some casts for now; we may
investigate getting rid of our __u64 _data[] VLA in a future patch so
that our start[0] members can be VLAs.
Reported-by: John Stoffel <john@stoffel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_update_interior.h')
-rw-r--r-- | fs/bcachefs/btree_update_interior.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_update_interior.h b/fs/bcachefs/btree_update_interior.h index 5e0a467fe905..d92b3cf5f5e0 100644 --- a/fs/bcachefs/btree_update_interior.h +++ b/fs/bcachefs/btree_update_interior.h @@ -271,7 +271,7 @@ static inline struct btree_node_entry *want_new_bset(struct bch_fs *c, struct btree_node_entry *bne = max(write_block(b), (void *) btree_bkey_last(b, bset_tree_last(b))); ssize_t remaining_space = - __bch_btree_u64s_remaining(c, b, &bne->keys.start[0]); + __bch_btree_u64s_remaining(c, b, bne->keys.start); if (unlikely(bset_written(b, bset(b, t)))) { if (remaining_space > (ssize_t) (block_bytes(c) >> 3)) |