diff --git a/src/manager.h b/src/manager.h index 23df1ac6f2b6b825793ea0b710e569459c3a78df..c32b43507e1ca13567bada7f4135331feffd89ee 100644 --- a/src/manager.h +++ b/src/manager.h @@ -48,7 +48,7 @@ namespace video { class SinkClient; } class RingBufferPool; -class VideoManager; +struct VideoManager; class Conference; class AudioLoop; class IceTransportFactory; diff --git a/src/media/audio/audiorecorder.cpp b/src/media/audio/audiorecorder.cpp index 4001c44892cc81e67c7d2a3bf39dab753cf7d990..80012b85d6cc8e24294b4b2b77a21bfc29c5897e 100644 --- a/src/media/audio/audiorecorder.cpp +++ b/src/media/audio/audiorecorder.cpp @@ -40,7 +40,7 @@ AudioRecorder::AudioRecorder(AudioRecord* arec, RingBufferPool& rbp) , buffer_(new AudioBuffer(BUFFER_LENGTH, AudioFormat::NONE())) , arecord_(arec) , thread_( - [this] { return true; }, + [] { return true; }, [this] { process(); }, [] {}) { diff --git a/src/media/audio/opensl/opensllayer.cpp b/src/media/audio/opensl/opensllayer.cpp index a00a3d8d75a7e0eac352c15d9678abbbf560eacf..c60ac20abbb138d36fb3822879d173ffa2bc7bae 100644 --- a/src/media/audio/opensl/opensllayer.cpp +++ b/src/media/audio/opensl/opensllayer.cpp @@ -241,7 +241,7 @@ OpenSLLayer::engineServiceRing(bool waiting) { } void -OpenSLLayer::engineServiceRec(bool waiting) { +OpenSLLayer::engineServiceRec(bool /* waiting */) { playCv.notify_one(); recCv.notify_one(); return; diff --git a/src/media/audio/resampler.h b/src/media/audio/resampler.h index df609a2ed17b5ce1c24150479ea851d542857622..00d50e965f663e38fc1ece3efe0e1430d4d4fed9 100644 --- a/src/media/audio/resampler.h +++ b/src/media/audio/resampler.h @@ -32,7 +32,7 @@ namespace ring { -struct SrcState; +class SrcState; class Resampler { public: diff --git a/src/media/libav_utils.cpp b/src/media/libav_utils.cpp index d87875ca6266a117d85748f3ead4608ceb7bebe1..7bb5588537c765d6e170ec16bd4f87c87a3f3eef 100644 --- a/src/media/libav_utils.cpp +++ b/src/media/libav_utils.cpp @@ -129,7 +129,7 @@ androidAvLogCb(void* ptr, int level, const char* fmt, va_list vl) case AV_LOG_TRACE: android_level = ANDROID_LOG_VERBOSE; break; default: android_level = ANDROID_LOG_DEFAULT; break; } - __android_log_print(android_level, "FFmpeg", line); + __android_log_print(android_level, "FFmpeg", "%s", line); } #endif diff --git a/src/media/video/androidvideo/video_device_impl.cpp b/src/media/video/androidvideo/video_device_impl.cpp index 30ebd8f9cfbb4c998ed153abdafe063f739f7abf..2dd11762d5d1753195e54e2317b35776743834f6 100644 --- a/src/media/video/androidvideo/video_device_impl.cpp +++ b/src/media/video/androidvideo/video_device_impl.cpp @@ -164,7 +164,6 @@ VideoDeviceImpl::getDeviceParams() const { DeviceParams params; std::stringstream ss1, ss2; - char sep; ss1 << fmt_->ring_format; ss1 >> params.format; @@ -212,13 +211,13 @@ VideoDevice::getChannelList() const } std::vector<VideoSize> -VideoDevice::getSizeList(const std::string& channel) const +VideoDevice::getSizeList(const std::string& /* channel */) const { return deviceImpl_->getSizeList(); } std::vector<FrameRate> -VideoDevice::getRateList(const std::string& channel, VideoSize size) const +VideoDevice::getRateList(const std::string& /* channel */, VideoSize /* size */) const { return deviceImpl_->getRateList(); } diff --git a/src/media/video/androidvideo/video_device_monitor_impl.cpp b/src/media/video/androidvideo/video_device_monitor_impl.cpp index 87cbf8a0b4a708906b36febc0de878558906265b..4af7cea095fcaa9308e42818ed6c9e19f9878798 100644 --- a/src/media/video/androidvideo/video_device_monitor_impl.cpp +++ b/src/media/video/androidvideo/video_device_monitor_impl.cpp @@ -59,12 +59,9 @@ class VideoDeviceMonitorImpl { private: NON_COPYABLE(VideoDeviceMonitorImpl); - - VideoDeviceMonitor* monitor_; }; -VideoDeviceMonitorImpl::VideoDeviceMonitorImpl(VideoDeviceMonitor* monitor) : - monitor_(monitor) +VideoDeviceMonitorImpl::VideoDeviceMonitorImpl(VideoDeviceMonitor* monitor) {} void VideoDeviceMonitorImpl::start() diff --git a/src/media/video/video_input.cpp b/src/media/video/video_input.cpp index 12043dad3032d48c4c81459487c0517718888e08..ab55d4ab6966964ad74e25326f92f46473deaa76 100644 --- a/src/media/video/video_input.cpp +++ b/src/media/video/video_input.cpp @@ -292,7 +292,7 @@ VideoInput::obtainFrame(int length) /* search for an available frame */ for(auto& buffer : buffers_) { - if (buffer.length == length && buffer.status == BUFFER_AVAILABLE) { + if (buffer.length == static_cast<size_t>(length) && buffer.status == BUFFER_AVAILABLE) { buffer.status = BUFFER_CAPTURING; return buffer.data; } diff --git a/src/ringdht/p2p.cpp b/src/ringdht/p2p.cpp index 6f6e09633143edd9c274140f7f2e4f3b3f96aa4c..5634d04a0071ba5f1a601568e3a945ad85d1d345 100644 --- a/src/ringdht/p2p.cpp +++ b/src/ringdht/p2p.cpp @@ -743,7 +743,7 @@ DhtPeerConnector::requestConnection(const std::string& peer_id, }); }, - [this, peer_h, connect_cb](const std::shared_ptr<RingAccount>& account, bool found) { + [peer_h, connect_cb](const std::shared_ptr<RingAccount>& account, bool found) { if (!found) { RING_WARN() << account << "[CNX] aborted, no devices for " << peer_h; connect_cb(nullptr); diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp index 6843e6e5ee6ffba4f83073ce0a9f2dddb6cc32c2..f3482b2c04956eee9ce4759b23ab8e5374867df5 100644 --- a/src/ringdht/ringaccount.cpp +++ b/src/ringdht/ringaccount.cpp @@ -1178,7 +1178,7 @@ RingAccount::loadAccountFromDHT(const std::string& archive_password, const std:: RING_ERR("DHT already running (stopping it first)."); dht_.join(); } - dht_.setOnStatusChanged([this](dht::NodeStatus s4, dht::NodeStatus s6) { + dht_.setOnStatusChanged([](dht::NodeStatus s4, dht::NodeStatus s6) { RING_WARN("Dht status : IPv4 %s; IPv6 %s", dhtStatusStr(s4), dhtStatusStr(s6)); }); dht_.run((in_port_t)dhtPortUsed_, {}, true); @@ -1754,7 +1754,7 @@ RingAccount::handlePendingCall(PendingCall& pc, bool incoming) /*.cert_key = */identity_.first, /*.dh_params = */dhParams_, /*.timeout = */std::chrono::duration_cast<decltype(tls::TlsParams::timeout)>(TLS_TIMEOUT), - /*.cert_check = */[waccount,wcall,remote_device,remote_account,incoming](unsigned status, + /*.cert_check = */[waccount,wcall,remote_device,remote_account](unsigned status, const gnutls_datum_t* cert_list, unsigned cert_num) -> pj_status_t { try { @@ -3308,7 +3308,7 @@ RingAccount::sendTextMessage(const std::string& to, const std::map<std::string, auto h = dht::InfoHash::get("inbox:"+dev.toString()); std::weak_ptr<RingAccount> wshared = shared; - auto list_token = shared->dht_.listen<dht::ImMessage>(h, [h,wshared,token,confirm](dht::ImMessage&& msg) { + auto list_token = shared->dht_.listen<dht::ImMessage>(h, [wshared,token,confirm](dht::ImMessage&& msg) { if (auto sthis = wshared.lock()) { auto& this_ = *sthis; // check expected message confirmation diff --git a/src/ringdht/ringaccount.h b/src/ringdht/ringaccount.h index bd99f8dda234d749c67664f172f262780cab8830..a80ecedcf86a5d871ce1bdf1d4cac81b72e2fc3f 100644 --- a/src/ringdht/ringaccount.h +++ b/src/ringdht/ringaccount.h @@ -382,7 +382,7 @@ class RingAccount : public SIPAccountBase { * Get last messages (should be used to retrieve messages when launching the client) * @param base_timestamp */ - std::vector<DRing::Message> getLastMessages(const uint64_t& base_timestamp); + std::vector<DRing::Message> getLastMessages(const uint64_t& base_timestamp) override; private: NON_COPYABLE(RingAccount); diff --git a/src/sip/sipaccountbase.h b/src/sip/sipaccountbase.h index 181269890d2ecdac9f2b8199618e819361491f5b..d943bc80ada2b8a57de0f2e3d1835a86e674db72 100644 --- a/src/sip/sipaccountbase.h +++ b/src/sip/sipaccountbase.h @@ -277,7 +277,7 @@ public: virtual std::string getUserUri() const = 0; - std::vector<DRing::Message> getLastMessages(const uint64_t& base_timestamp) { + std::vector<DRing::Message> getLastMessages(const uint64_t& base_timestamp) override { std::lock_guard<std::mutex> lck(mutexLastMessages_); auto it = lastMessages_.begin(); size_t num = lastMessages_.size(); diff --git a/src/sip/sipcall.h b/src/sip/sipcall.h index a441f42cfdc3f092014b96eb23f9fcebeccd527c..01e2a04735048ae89c022e104a844f2c65bad57f 100644 --- a/src/sip/sipcall.h +++ b/src/sip/sipcall.h @@ -105,7 +105,7 @@ public: // overridden bool useVideoCodec(const AccountVideoCodecInfo* codec) const override; std::map<std::string, std::string> getDetails() const override; - virtual bool toggleRecording(); // SIPCall needs to spread recorder to rtp sessions, so override + virtual bool toggleRecording() override; // SIPCall needs to spread recorder to rtp sessions, so override public: // SIP related /** diff --git a/src/smartools.cpp b/src/smartools.cpp index 75d6081ea4d57ba910a3aaabc5460e0c9156427f..f01f7cfaa247f05a6f2d39270bcc0de77e570e54 100644 --- a/src/smartools.cpp +++ b/src/smartools.cpp @@ -36,7 +36,7 @@ Smartools& Smartools::getInstance() // Launch process() in new thread Smartools::Smartools() -: loop_([this] { return true; }, [this] { process(); }, [] {}) +: loop_([] { return true; }, [this] { process(); }, [] {}) {} Smartools::~Smartools() diff --git a/src/upnp/upnp_context.cpp b/src/upnp/upnp_context.cpp index 0d40d24e65256b264a7162812a7d30bf1da546ed..30b4cb03bb802ff88076fbce05b1a188382bc417 100644 --- a/src/upnp/upnp_context.cpp +++ b/src/upnp/upnp_context.cpp @@ -386,7 +386,7 @@ UPnPContext::addMapping(IGD* igd, #endif { /* success; add it to global list */ - globalMappings->emplace(port_external, std::move(GlobalMapping{mapping})); + globalMappings->emplace(port_external, GlobalMapping{mapping}); #if HAVE_LIBNATPMP #if HAVE_LIBUPNP if (not upnp)