Skip to content

Commit

Permalink
AudioCommon: unlock mutex explicitly to avoid -Wunused-result warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Tilka committed Jun 20, 2024
1 parent 0cc1d4c commit 1d8b171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Core/AudioCommon/AlsaSoundStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 1d8b171

Please sign in to comment.