Whamcloud - gitweb
LU-16518 mdt: implicit truncation to a one-bit field 47/58347/3
authorTimothy Day <timday@amazon.com>
Sat, 8 Mar 2025 20:28:26 +0000 (15:28 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 31 Mar 2025 05:56:30 +0000 (05:56 +0000)
Change the uc_rbac one-bit fields to unsigned int
to avoid an implicit truncation error reported by
Clang (-Wsingle-bit-bitfield-constant-conversion).

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I394e71d5d572d4586de55093d4cc60729041a822
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58347
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/md_object.h

index 24f61be..bc171fd 100644 (file)
@@ -681,16 +681,16 @@ struct lu_ucred {
        char                     uc_jobid[LUSTRE_JOBID_SIZE];
        struct lnet_nid          uc_nid;
        bool                     uc_enable_audit;
-       int                      uc_rbac_file_perms:1;
-       int                      uc_rbac_dne_ops:1;
-       int                      uc_rbac_quota_ops:1;
-       int                      uc_rbac_byfid_ops:1;
-       int                      uc_rbac_chlg_ops:1;
-       int                      uc_rbac_fscrypt_admin:1;
-       int                      uc_rbac_server_upcall:1;
-       int                      uc_rbac_ignore_root_prjquota:1;
-       int                      uc_rbac_hsm_ops:1;
-       int                      uc_rbac_local_admin:1;
+       unsigned int             uc_rbac_file_perms:1;
+       unsigned int             uc_rbac_dne_ops:1;
+       unsigned int             uc_rbac_quota_ops:1;
+       unsigned int             uc_rbac_byfid_ops:1;
+       unsigned int             uc_rbac_chlg_ops:1;
+       unsigned int             uc_rbac_fscrypt_admin:1;
+       unsigned int             uc_rbac_server_upcall:1;
+       unsigned int             uc_rbac_ignore_root_prjquota:1;
+       unsigned int             uc_rbac_hsm_ops:1;
+       unsigned int             uc_rbac_local_admin:1;
 };
 
 struct lu_ucred *lu_ucred(const struct lu_env *env);