io_uring: fix pointer cast warning on 32-bit
authorJens Axboe <axboe@kernel.dk>
Sun, 13 Jan 2019 16:17:39 +0000 (09:17 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 13 Jan 2019 16:17:39 +0000 (09:17 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/io_uring.c
t/io_uring.c

index 2186031b8668581a865dd637c1ff1a6bf493a926..56af8d7181321c3ff0768687e43766c134d48e61 100644 (file)
@@ -187,7 +187,7 @@ static struct io_u *fio_ioring_event(struct thread_data *td, int event)
        index = (event + ld->cq_ring_off) & ld->cq_ring_mask;
 
        cqe = &ld->cq_ring.cqes[index];
-       io_u = (struct io_u *) cqe->user_data;
+       io_u = (struct io_u *) (uintptr_t) cqe->user_data;
 
        if (cqe->res != io_u->xfer_buflen) {
                if (cqe->res > io_u->xfer_buflen)
index b10a1b2a57d97ea86475705178623771e94b9fda..706a1bef42d69bec51e0f8db6b1e40f29474d5cf 100644 (file)
@@ -261,7 +261,7 @@ static int reap_events(struct submitter *s)
                        break;
                cqe = &ring->cqes[head & cq_ring_mask];
                if (!do_nop) {
-                       f = (struct file *) cqe->user_data;
+                       f = (struct file *) (uintptr_t) cqe->user_data;
                        f->pending_ios--;
                        if (cqe->res != BS) {
                                printf("io: unexpected ret=%d\n", cqe->res);