From 0d013603bd624dc0bf1a95abda8bafcd25e146d9 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 20 Jun 2018 21:33:58 +0300 Subject: [PATCH] Fix "no return in nonvoid function" error in libtgvoip (#167) Return nullptr to avoid compile error. Before this commit these functions: 1. void *AudioInputALSA::StartThread(); 2. void *AudioOutputALSA::StartThread() - don't return any values. Also please note that this fix should be ported after syncing libtgvoip to upstream if these functions still don't return values! Related to #153. --- Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp | 3 ++- Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp b/Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp index 027ba155d..aa0e06aca 100644 --- a/Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp +++ b/Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp @@ -71,6 +71,7 @@ void AudioInputALSA::Stop(){ void* AudioInputALSA::StartThread(void* arg){ ((AudioInputALSA*)arg)->RunThread(); + return nullptr; } void AudioInputALSA::RunThread(){ @@ -176,4 +177,4 @@ void AudioInputALSA::EnumerateDevices(std::vector& devs){ } dlclose(lib); -} \ No newline at end of file +} diff --git a/Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp b/Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp index bad556179..8717358e4 100644 --- a/Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp +++ b/Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp @@ -74,6 +74,7 @@ bool AudioOutputALSA::IsPlaying(){ void* AudioOutputALSA::StartThread(void* arg){ ((AudioOutputALSA*)arg)->RunThread(); + return nullptr; } void AudioOutputALSA::RunThread(){ @@ -179,4 +180,4 @@ void AudioOutputALSA::EnumerateDevices(std::vector& devs){ } dlclose(lib); -} \ No newline at end of file +}