From bb209d680e10004286775510f7e2e4e19956312c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 21 Nov 2021 06:50:22 -0700 Subject: [PATCH] t/io_uring: fix 32-bit compile warnings We need to use a 64-bit cast for the shift the the user_data, and fix the init of minv in the clat percentile calculation. Signed-off-by: Jens Axboe --- t/io_uring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/io_uring.c b/t/io_uring.c index 7bf215c7..a98f78fd 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -192,7 +192,7 @@ unsigned int calc_clat_percentiles(unsigned long *io_u_plat, unsigned long nr, unsigned long *ovals = NULL; bool is_last; - *minv = -1ULL; + *minv = -1UL; *maxv = 0; ovals = malloc(len * sizeof(*ovals)); @@ -498,7 +498,7 @@ static void init_io(struct submitter *s, unsigned index) sqe->off = offset; sqe->user_data = (unsigned long) f->fileno; if (stats && stats_running) - sqe->user_data |= ((unsigned long)s->clock_index << 32); + sqe->user_data |= ((uint64_t)s->clock_index << 32); } static int prep_more_ios_uring(struct submitter *s, int max_ios) -- 2.25.1