From b46e943839851fbb5ca800a2dc8462f2347958db Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 23 Aug 2021 20:35:55 +0200 Subject: [PATCH] Use a more C++-standard way of suppressing the unused variable warning in submit_stat(). --- io_uring_engine.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/io_uring_engine.cpp b/io_uring_engine.cpp index ea71c96..63a3af7 100644 --- a/io_uring_engine.cpp +++ b/io_uring_engine.cpp @@ -46,7 +46,7 @@ IOUringEngine::IOUringEngine(size_t slop_bytes) #endif } -void IOUringEngine::submit_stat(const char *path, std::function cb) +void IOUringEngine::submit_stat(const char *path [[maybe_unused]], std::function cb [[maybe_unused]]) { assert(supports_stat); @@ -64,10 +64,6 @@ void IOUringEngine::submit_stat(const char *path, std::function cb) qs.pathname = strdup(path); queued_stats.push(move(qs)); } -#else - /* unused parameters */ - (void)path; - (void)cb; #endif } -- 2.39.5