From 1d8b1715ab9ba7ac028ccf06859f4ca15f955351 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 25 May 2024 02:19:40 +0100 Subject: [PATCH] AudioCommon: unlock mutex explicitly to avoid -Wunused-result warning --- Source/Core/AudioCommon/AlsaSoundStream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/AudioCommon/AlsaSoundStream.cpp b/Source/Core/AudioCommon/AlsaSoundStream.cpp index 5645efa58b..b9e817331c 100644 --- a/Source/Core/AudioCommon/AlsaSoundStream.cpp +++ b/Source/Core/AudioCommon/AlsaSoundStream.cpp @@ -20,7 +20,7 @@ AlsaSound::~AlsaSound() m_thread_status.store(ALSAThreadStatus::STOPPING); // Immediately lock and unlock mutex to prevent cv race. - std::unique_lock{cv_m}; + std::unique_lock{cv_m}.unlock(); // Give the opportunity to the audio thread // to realize we are stopping the emulation @@ -82,7 +82,7 @@ bool AlsaSound::SetRunning(bool running) m_thread_status.store(running ? ALSAThreadStatus::RUNNING : ALSAThreadStatus::PAUSED); // Immediately lock and unlock mutex to prevent cv race. - std::unique_lock{cv_m}; + std::unique_lock{cv_m}.unlock(); // Notify thread that status has changed cv.notify_one();