Skip to content

Commit 2c3a0b7

Browse files
GustavoARSilvateigland
authored andcommitted
dlm: 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. Move the conflicting declaration to the end of the corresponding structure. Notice that `struct dlm_message` is a flexible structure, this is a structure that contains a flexible-array member. Fix the following warning: fs/dlm/dlm_internal.h:609:33: 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: David Teigland <teigland@redhat.com>
1 parent 6dda4f0 commit 2c3a0b7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs/dlm/dlm_internal.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ struct dlm_ls {
606606

607607
struct dlm_rsb ls_local_rsb; /* for returning errors */
608608
struct dlm_lkb ls_local_lkb; /* for returning errors */
609-
struct dlm_message ls_local_ms; /* for faking a reply */
610609

611610
struct dentry *ls_debug_rsb_dentry; /* debugfs */
612611
struct dentry *ls_debug_waiters_dentry; /* debugfs */
@@ -665,6 +664,9 @@ struct dlm_ls {
665664

666665
int ls_namelen;
667666
char ls_name[DLM_LOCKSPACE_LEN + 1];
667+
668+
/* Must be last --ends in a flexible-array member.*/
669+
struct dlm_message ls_local_ms; /* for faking a reply */
668670
};
669671

670672
/*

0 commit comments

Comments
 (0)