From 6dfa10ab22a6a322269a3454d7ac720dc2f8bf11 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 31 Oct 2023 18:05:22 -0400 Subject: 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 Signed-off-by: Kent Overstreet --- fs/bcachefs/bcachefs_format.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'fs/bcachefs/bcachefs_format.h') diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h index 29b000c6b7e1..5b44598b9df9 100644 --- a/fs/bcachefs/bcachefs_format.h +++ b/fs/bcachefs/bcachefs_format.h @@ -1617,9 +1617,7 @@ struct journal_seq_blacklist_entry { struct bch_sb_field_journal_seq_blacklist { struct bch_sb_field field; - - struct journal_seq_blacklist_entry start[0]; - __u64 _data[]; + struct journal_seq_blacklist_entry start[]; }; struct bch_sb_field_errors { -- cgit v1.2.3