--- /usr/include/lustre/lustre_user.h 2017-02-17 03:43:53.000000000 +0000 +++ lustre_user.h 2017-03-21 19:32:19.466854000 +0000 @@ -911,7 +911,7 @@ static inline size_t changelog_rec_size(struct changelog_rec *rec) { - return changelog_rec_offset(rec->cr_flags); + return changelog_rec_offset((changelog_rec_flags)rec->cr_flags); } static inline size_t changelog_rec_varsize(struct changelog_rec *rec) @@ -922,7 +922,7 @@ static inline struct changelog_ext_rename *changelog_rec_rename(struct changelog_rec *rec) { - enum changelog_rec_flags crf = rec->cr_flags & CLF_VERSION; + enum changelog_rec_flags crf = (changelog_rec_flags)(rec->cr_flags & CLF_VERSION); return (struct changelog_ext_rename *)((char *)rec + changelog_rec_offset(crf)); @@ -932,8 +932,8 @@ static inline struct changelog_ext_jobid *changelog_rec_jobid(struct changelog_rec *rec) { - enum changelog_rec_flags crf = rec->cr_flags & - (CLF_VERSION | CLF_RENAME); + enum changelog_rec_flags crf = (changelog_rec_flags)(rec->cr_flags & + (CLF_VERSION | CLF_RENAME)); return (struct changelog_ext_jobid *)((char *)rec + changelog_rec_offset(crf)); @@ -942,8 +942,8 @@ /* The name follows the rename and jobid extensions, if present */ static inline char *changelog_rec_name(struct changelog_rec *rec) { - return (char *)rec + changelog_rec_offset(rec->cr_flags & - CLF_SUPPORTED); + return (char *)rec + changelog_rec_offset((changelog_rec_flags)(rec->cr_flags & + CLF_SUPPORTED)); } static inline size_t changelog_rec_snamelen(struct changelog_rec *rec) @@ -983,7 +983,7 @@ char *jid_mov; char *rnm_mov; - crf_wanted &= CLF_SUPPORTED; + crf_wanted = (changelog_rec_flags)(crf_wanted & CLF_SUPPORTED); if ((rec->cr_flags & CLF_SUPPORTED) == crf_wanted) return; @@ -994,9 +994,9 @@ /* Locations of jobid and rename extensions in the remapped record */ jid_mov = (char *)rec + - changelog_rec_offset(crf_wanted & ~CLF_JOBID); + changelog_rec_offset((changelog_rec_flags)(crf_wanted & ~CLF_JOBID)); rnm_mov = (char *)rec + - changelog_rec_offset(crf_wanted & ~(CLF_JOBID | CLF_RENAME)); + changelog_rec_offset((changelog_rec_flags)(crf_wanted & ~(CLF_JOBID | CLF_RENAME))); /* Move the extension fields to the desired positions */ if ((crf_wanted & CLF_JOBID) && (rec->cr_flags & CLF_JOBID))