summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-12-20 11:36:39 -0700
committerJens Axboe <axboe@kernel.dk>2022-03-30 14:44:51 -0600
commite5dcfbf4c94135a2ba188d475eba60f63b10e5d0 (patch)
tree207d804f92debcd00f4e31e2ef23711e66338c00
parent894d32dc15a2919642f2d326f36d9126933055ae (diff)
downloadliburing-xattr.tar.gz
liburing-xattr.tar.bz2
32-bit build warning cleanupsxattr
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 105f5dc..b5aab6e 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -735,8 +735,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;
}
@@ -747,8 +748,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;
}
@@ -758,7 +760,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;
}
@@ -769,7 +772,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;
}