lustre_user_cxx.patch 2.47 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
--- /usr/include/lustre/lustre_user.h	2017-02-17 03:43:53.000000000 +0000
+++ lustre_user.h	2017-03-16 14:55:10.257941000 +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(static_cast<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 = static_cast<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 = static_cast<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(static_cast<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 = static_cast<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(static_cast<changelog_rec_flags>(crf_wanted & ~CLF_JOBID));
 	rnm_mov = (char *)rec +
-		  changelog_rec_offset(crf_wanted & ~(CLF_JOBID | CLF_RENAME));
+                changelog_rec_offset(static_cast<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))