From e59defb8642077c051f9166175219f16ebf43e0b Mon Sep 17 00:00:00 2001 From: "Echo J." Date: Wed, 26 Feb 2025 17:34:03 +0200 Subject: [PATCH] fix: remove some warnings (#5998) --- src/singletons/StreamerMode.cpp | 2 +- tests/src/AccessGuard.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/singletons/StreamerMode.cpp b/src/singletons/StreamerMode.cpp index ca63316a..33a08900 100644 --- a/src/singletons/StreamerMode.cpp +++ b/src/singletons/StreamerMode.cpp @@ -143,7 +143,7 @@ bool isBroadcasterSoftwareActive() } #else -# warning Unsupported OS: Broadcasting software can't be detected +# warning Unsupported OS: Broadcasting software can\'t be detected #endif return false; } diff --git a/tests/src/AccessGuard.cpp b/tests/src/AccessGuard.cpp index 56cbc727..8207b05b 100644 --- a/tests/src/AccessGuard.cpp +++ b/tests/src/AccessGuard.cpp @@ -42,8 +42,6 @@ TEST(AccessGuardLocker, ConcurrentUsage) std::shared_mutex m; int e = 0; - auto startTime = std::chrono::steady_clock::now(); - auto w = [&e, &m] { std::mt19937_64 eng{std::random_device{}()}; std::uniform_int_distribution<> dist{1, 4}; @@ -58,7 +56,8 @@ TEST(AccessGuardLocker, ConcurrentUsage) { SharedAccessGuard guard(e, m); std::this_thread::sleep_for(std::chrono::milliseconds{dist(eng)}); - int hehe = *guard; + volatile int hehe = *guard; + (void)hehe; } };