From 7721b7bb7da2e9b0aa4cb4d98e0227a320778ab4 Mon Sep 17 00:00:00 2001 From: Lipeng Zhu Date: Sun, 16 Jun 2024 09:30:36 -0400 Subject: [PATCH] minor fix. Signed-off-by: Lipeng Zhu Co-authored-by: Wangyang Guo --- src/io_uring.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/io_uring.c b/src/io_uring.c index ac8c1bc049..4362972762 100644 --- a/src/io_uring.c +++ b/src/io_uring.c @@ -34,10 +34,10 @@ io_uring *getIOUring() { /* Submit fdatasync request to io_uring. */ void ioUringPrepFsyncAndSubmit(io_uring *io_uring, int fd) { - struct io_uring_sqe *sqe = io_uring_get_sqe(_io_uring); + struct io_uring_sqe *sqe = io_uring_get_sqe(io_uring); io_uring_prep_fsync(sqe, fd, IORING_FSYNC_DATASYNC); io_uring_queue_len++; - io_uring_submit(_io_uring); + io_uring_submit(io_uring); } void ioUringWaitFsyncBarrier(io_uring *io_uring) { @@ -72,18 +72,24 @@ void freeIOUring(void) { } } #else +#ifndef UNUSED +#define UNUSED(V) ((void)V) +#endif + void initIOUring(void) { } io_uring *getIOUring(void) { - return NULL; + return 0; } void ioUringPrepFsyncAndSubmit(io_uring *io_uring, int fd) { + UNUSED(io_uring); UNUSED(fd); } void ioUringWaitFsyncBarrier(io_uring *io_uring) { + UNUSED(io_uring); } void freeIOUring(void) {