summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-12-20 11:36:39 -0700
committerJens Axboe <axboe@kernel.dk>2021-12-20 11:36:39 -0700
commitcce028f8ce0cc0669b7151bbf6b7b64bda042521 (patch)
tree16bf01c1afdff9ced0ceb2595046abfbc45cb25d
parent1711bd8ab3d60913abcbae48db09399d9f97bf23 (diff)
downloadliburing-cce028f8ce0cc0669b7151bbf6b7b64bda042521.tar.gz
liburing-cce028f8ce0cc0669b7151bbf6b7b64bda042521.tar.bz2
32-bit build warning cleanups
We need to cast pointers to uintptr_t first before casting to 64-bit, or they complain about the differences in size. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--src/include/liburing.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index bc1cf81..178b16f 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -714,8 +714,9 @@ static inline void io_uring_prep_getxattr(struct io_uring_sqe *sqe,
const char *path,
size_t len)
{
- io_uring_prep_rw(IORING_OP_GETXATTR, sqe, 0, name, len, (__u64) value);
- sqe->addr3 = (__u64) path;
+ io_uring_prep_rw(IORING_OP_GETXATTR, sqe, 0, name, len,
+ (__u64) (uintptr_t) value);
+ sqe->addr3 = (__u64) (uintptr_t) path;
sqe->xattr_flags = 0;
}
@@ -726,8 +727,9 @@ static inline void io_uring_prep_setxattr(struct io_uring_sqe *sqe,
int flags,
size_t len)
{
- io_uring_prep_rw(IORING_OP_SETXATTR, sqe, 0, name, len, (__u64) value);
- sqe->addr3 = (__u64) path;
+ io_uring_prep_rw(IORING_OP_SETXATTR, sqe, 0, name, len,
+ (__u64) (uintptr_t) value);
+ sqe->addr3 = (__u64) (uintptr_t) path;
sqe->xattr_flags = flags;
}
@@ -737,7 +739,8 @@ static inline void io_uring_prep_fgetxattr(struct io_uring_sqe *sqe,
const char *value,
size_t len)
{
- io_uring_prep_rw(IORING_OP_FGETXATTR, sqe, fd, name, len, (__u64) value);
+ io_uring_prep_rw(IORING_OP_FGETXATTR, sqe, fd, name, len,
+ (__u64) (uintptr_t) value);
sqe->xattr_flags = 0;
}
@@ -748,7 +751,8 @@ static inline void io_uring_prep_fsetxattr(struct io_uring_sqe *sqe,
int flags,
size_t len)
{
- io_uring_prep_rw(IORING_OP_FSETXATTR, sqe, fd, name, len, (__u64) value);
+ io_uring_prep_rw(IORING_OP_FSETXATTR, sqe, fd, name, len,
+ (__u64) (uintptr_t) value);
sqe->xattr_flags = flags;
}