From 6e635934c1ec68996bb3f4d5d1172092952d73b5 Mon Sep 17 00:00:00 2001 From: mutouyun Date: Sat, 23 Sep 2023 12:47:00 +0800 Subject: [PATCH] disable warning C4858 --- .gitignore | 1 + src/libipc/waiter.h | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9bca061..b857371 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ ui_*.h *.jsc Makefile* *build-* +*build_* # Qt unit tests target_wrapper.* diff --git a/src/libipc/waiter.h b/src/libipc/waiter.h index ee45fe3..bb5b3b3 100644 --- a/src/libipc/waiter.h +++ b/src/libipc/waiter.h @@ -64,12 +64,16 @@ public: } bool notify() noexcept { - std::lock_guard{lock_}; // barrier + { + IPC_UNUSED_ std::lock_guard barrier{lock_}; // barrier + } return cond_.notify(lock_); } bool broadcast() noexcept { - std::lock_guard{lock_}; // barrier + { + IPC_UNUSED_ std::lock_guard barrier{lock_}; // barrier + } return cond_.broadcast(lock_); }