Skip to content

Commit b4ae826

Browse files
GustavoARSilvasmfrench
authored andcommitted
smb: client: Avoid a dozen -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. Move the conflicting declaration to the end of the corresponding structure. Notice that struct smb2_file_all_info is a flexible structure, this is a structure that contains a flexible-array member. Fix the following warnings: 12 fs/smb/client/cached_dir.h:51:35: 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: Steve French <stfrench@microsoft.com>
1 parent fbcdc61 commit b4ae826

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs/smb/client/cached_dir.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ struct cached_fid {
4848
struct dentry *dentry;
4949
struct work_struct put_work;
5050
struct work_struct close_work;
51-
struct smb2_file_all_info file_all_info;
5251
struct cached_dirents dirents;
52+
53+
/* Must be last as it ends in a flexible-array member. */
54+
struct smb2_file_all_info file_all_info;
5355
};
5456

5557
/* default MAX_CACHED_FIDS is 16 */

0 commit comments

Comments
 (0)