From a8f0f997f695caea2d2abec8595bf1e01504d205 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 11 Apr 2023 11:48:09 +0200 Subject: [PATCH] echo: lock_guard should not be a temporary --- src/audio/echo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/echo.cpp b/src/audio/echo.cpp index 39e784a2f..1a33ba6a5 100644 --- a/src/audio/echo.cpp +++ b/src/audio/echo.cpp @@ -182,7 +182,7 @@ void echo_cancellation_destroy(struct echo_cancellation *s) void echo_play(struct echo_cancellation *s, struct audio_frame *frame) { - std::lock_guard(s->lock); + std::lock_guard lk(s->lock); if(frame->ch_count != 1) { static int prints = 0; @@ -240,7 +240,7 @@ struct audio_frame * echo_cancel(struct echo_cancellation *s, struct audio_frame { struct audio_frame *res; - std::lock_guard(s->lock); + std::lock_guard lk(s->lock); if(frame->ch_count != 1) { static int prints = 0;