From: Steinar H. Gunderson Date: Mon, 23 Aug 2021 18:35:55 +0000 (+0200) Subject: Use a more C++-standard way of suppressing the unused variable warning in submit_stat(). X-Git-Tag: 1.1.10~1 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b46e943839851fbb5ca800a2dc8462f2347958db;hp=6d04ac0835c3c5e065fefd27ce89024120652523;p=plocate Use a more C++-standard way of suppressing the unused variable warning in submit_stat(). --- 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 }