summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-04-24 07:47:50 -0600
committerJens Axboe <axboe@kernel.dk>2020-04-24 07:47:50 -0600
commitea020b5497954a41a61e352666f0bd0b3afde874 (patch)
tree30ae11432dc8f1816d82a2cebc0bb98912d79f43 /test
parent459e895f1167bbfc52649c204abc362a592d2bcb (diff)
downloadliburing-ea020b5497954a41a61e352666f0bd0b3afde874.tar.gz
liburing-ea020b5497954a41a61e352666f0bd0b3afde874.tar.bz2
Fix 32-bit warnings on compile
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test')
-rw-r--r--test/lfs-openat-write.c3
-rw-r--r--test/lfs-openat.c3
-rw-r--r--test/read-write.c3
-rw-r--r--test/send_recvmsg.c2
4 files changed, 9 insertions, 2 deletions
diff --git a/test/lfs-openat-write.c b/test/lfs-openat-write.c
index 951ae7e..9992274 100644
--- a/test/lfs-openat-write.c
+++ b/test/lfs-openat-write.c
@@ -1,3 +1,6 @@
+#define _LARGEFILE_SOURCE
+#define _FILE_OFFSET_BITS 64
+
#include <liburing.h>
#include <string.h>
#include <stdio.h>
diff --git a/test/lfs-openat.c b/test/lfs-openat.c
index d26111a..d69096e 100644
--- a/test/lfs-openat.c
+++ b/test/lfs-openat.c
@@ -1,3 +1,6 @@
+#define _LARGEFILE_SOURCE
+#define _FILE_OFFSET_BITS 64
+
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/test/read-write.c b/test/read-write.c
index 9450a8c..4a4a22e 100644
--- a/test/read-write.c
+++ b/test/read-write.c
@@ -394,7 +394,8 @@ static int test_eventfd_read(void)
if (cqe->res == -EINVAL) {
fprintf(stdout, "eventfd IO not supported, skipping\n");
} else if (cqe->res != sizeof(eventfd_t)) {
- fprintf(stderr, "cqe res %d, wanted %ld\n", cqe->res, sizeof(eventfd_t));
+ fprintf(stderr, "cqe res %d, wanted %d\n", cqe->res,
+ (int) sizeof(eventfd_t));
return 1;
}
io_uring_cqe_seen(&ring, cqe);
diff --git a/test/send_recvmsg.c b/test/send_recvmsg.c
index ce08ff1..1b03ce9 100644
--- a/test/send_recvmsg.c
+++ b/test/send_recvmsg.c
@@ -103,7 +103,7 @@ static int do_recvmsg(struct io_uring *ring, struct iovec *iov,
if (bid != BUF_BID)
fprintf(stderr, "Buffer ID mismatch %d\n", bid);
/* just for passing the pointer to str */
- iov->iov_base = (void *) cqe->user_data;
+ iov->iov_base = (void *) (uintptr_t) cqe->user_data;
}
if (rd->no_buf_add && rd->buf_select) {