Merge pull request #12800 from Tilka/unused_result

AudioCommon: release mutex explicitly to avoid -Wunused-result warning
This commit is contained in:
Admiral H. Curtiss 2024-06-21 20:02:40 +02:00 committed by GitHub
commit 8b9ac5d767
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ AlsaSound::~AlsaSound()
m_thread_status.store(ALSAThreadStatus::STOPPING);
// Immediately lock and unlock mutex to prevent cv race.
std::unique_lock<std::mutex>{cv_m};
std::unique_lock<std::mutex>{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<std::mutex>{cv_m};
std::unique_lock<std::mutex>{cv_m}.unlock();
// Notify thread that status has changed
cv.notify_one();