Commit 0748b67b authored by Philippe Gorley's avatar Philippe Gorley Committed by Adrien Béraud

misc: fix warnings

Change-Id: Ifc84b3f16a57e4d1aa23ef5453d5c2065fb27784
parent a2207056
......@@ -48,7 +48,7 @@ namespace video {
class SinkClient;
}
class RingBufferPool;
class VideoManager;
struct VideoManager;
class Conference;
class AudioLoop;
class IceTransportFactory;
......
......@@ -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(); },
[] {})
{
......
......@@ -241,7 +241,7 @@ OpenSLLayer::engineServiceRing(bool waiting) {
}
void
OpenSLLayer::engineServiceRec(bool waiting) {
OpenSLLayer::engineServiceRec(bool /* waiting */) {
playCv.notify_one();
recCv.notify_one();
return;
......
......@@ -32,7 +32,7 @@
namespace ring {
struct SrcState;
class SrcState;
class Resampler {
public:
......
......@@ -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
......
......@@ -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();
}
......
......@@ -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()
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -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();
......
......@@ -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
/**
......
......@@ -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()
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment