summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-12-17 13:29:31 -0700
committerJens Axboe <axboe@kernel.dk>2020-12-17 13:30:42 -0700
commit31a9f9cb495b468f3a93c4edaf8fccd65aa86f64 (patch)
treea9707257fd69642a68e3ea13ca90b78396d5fc95
parent791828815ede5394749d97162890378867a1d79b (diff)
downloadliburing-31a9f9cb495b468f3a93c4edaf8fccd65aa86f64.tar.gz
liburing-31a9f9cb495b468f3a93c4edaf8fccd65aa86f64.tar.bz2
liburing.h: fix 32-bit compile warning
Cast 'ts' to uintptr_t, to avoid having the compiler complain about casting it to a 64-bit size. ../src/include/liburing.h: In function ‘io_uring_prep_timeout_update’: ../src/include/liburing.h:342:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 342 | (void *)(unsigned long)user_data, 0, (__u64)ts); | ^ Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--src/include/liburing.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 520cd55..90403bc 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -339,7 +339,8 @@ static inline void io_uring_prep_timeout_update(struct io_uring_sqe *sqe,
__u64 user_data, unsigned flags)
{
io_uring_prep_rw(IORING_OP_TIMEOUT_REMOVE, sqe, -1,
- (void *)(unsigned long)user_data, 0, (__u64)ts);
+ (void *)(unsigned long)user_data, 0,
+ (uintptr_t)ts);
sqe->timeout_flags = flags | IORING_TIMEOUT_UPDATE;
}