From: Jens Axboe Date: Sun, 21 Nov 2021 13:50:22 +0000 (-0700) Subject: t/io_uring: fix 32-bit compile warnings X-Git-Tag: fio-3.29~31 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=bb209d680e10004286775510f7e2e4e19956312c;p=fio.git 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 --- 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)