From 8f6d1311afd37bf70b5b0bd7ebb0944ed9460d34 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 18 Aug 2016 08:17:53 -0600 Subject: [PATCH] fio: use the proper enum type for the shifted IO engine flags Signed-off-by: Jens Axboe --- fio.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fio.h b/fio.h index 0da0bc5d..a62b1559 100644 --- a/fio.h +++ b/fio.h @@ -563,7 +563,8 @@ enum { static inline enum fio_ioengine_flags td_ioengine_flags(struct thread_data *td) { - return (td->flags >> TD_ENG_FLAG_SHIFT) & TD_ENG_FLAG_MASK; + return (enum fio_ioengine_flags) + ((td->flags >> TD_ENG_FLAG_SHIFT) & TD_ENG_FLAG_MASK); } static inline void td_set_ioengine_flags(struct thread_data *td) @@ -571,9 +572,10 @@ static inline void td_set_ioengine_flags(struct thread_data *td) td->flags |= (td->io_ops->flags << TD_ENG_FLAG_SHIFT); } -static inline bool td_ioengine_flagged(struct thread_data *td, unsigned int val) +static inline bool td_ioengine_flagged(struct thread_data *td, + enum fio_ioengine_flags flags) { - return ((td->flags >> TD_ENG_FLAG_SHIFT) & val) != 0; + return ((td->flags >> TD_ENG_FLAG_SHIFT) & flags) != 0; } extern void td_set_runstate(struct thread_data *, int); -- 2.25.1