diff --git a/src/account_factory.cpp b/src/account_factory.cpp
index 1d55ef44faeb0718b2b676b8cbfd289bff66d338..e711bfd60db6033dea46f9661b621676e561581a 100644
--- a/src/account_factory.cpp
+++ b/src/account_factory.cpp
@@ -107,7 +107,7 @@ AccountFactory::removeAccount(Account& account)
     RING_DBG("Removing account %s", id.c_str());
     auto& map = accountMaps_.at(account.getAccountType());
     map.erase(id);
-    RING_DBG("Remaining %u %s account(s)", map.size(), account_type);
+    RING_DBG("Remaining %zu %s account(s)", map.size(), account_type);
 }
 
 void
diff --git a/src/call_factory.cpp b/src/call_factory.cpp
index 91eb2dfdd2bfd0f1659bf75018c117de8060f4a3..dcd3ac806553225f2b33603dcb0c65393b1496ec 100644
--- a/src/call_factory.cpp
+++ b/src/call_factory.cpp
@@ -50,7 +50,7 @@ CallFactory::removeCall(Call& call)
     const auto& linkType = call.getLinkType();
     auto& map = callMaps_.at(linkType);
     map.erase(id);
-    RING_DBG("Remaining %u %s call(s)", map.size(), linkType);
+    RING_DBG("Remaining %zu %s call(s)", map.size(), linkType);
 }
 
 void
diff --git a/src/enumclass_utils.h b/src/enumclass_utils.h
index 283a11cc31f85bfb01a150e86f8784077039f7f4..f67ef8d699f88e9083421879543adff9802d63ff 100644
--- a/src/enumclass_utils.h
+++ b/src/enumclass_utils.h
@@ -198,7 +198,7 @@ template<class Row, typename Value, typename Accessor>
 const Value Matrix1D<Row,Value,Accessor>::operator[](Row v) const {
     assert(size_t(v) <= enum_class_size<Row>()+1 && size_t(v)>=0); //COUNT__ is also valid
     if (size_t(v) >= enum_class_size<Row>()) {
-        RING_ERR("State Machine Out of Bounds %d\n", size_t(v));
+        RING_ERR("State Machine Out of Bounds %zu\n", size_t(v));
         assert(false);
         throw v;
     }
diff --git a/src/ice_transport.cpp b/src/ice_transport.cpp
index b2dc0704b7af7877854db3873d1c80e71bc95c4e..140ded90c11236c04c336ca77e5ebba9888558b6 100644
--- a/src/ice_transport.cpp
+++ b/src/ice_transport.cpp
@@ -309,7 +309,7 @@ IceTransport::start(const Attribute& rem_attrs,
     }
 
     pj_str_t ufrag, pwd;
-    RING_DBG("ICE negotiation starting (%u remote candidates)", rem_candidates.size());
+    RING_DBG("ICE negotiation starting (%zu remote candidates)", rem_candidates.size());
     auto status = pj_ice_strans_start_ice(icest_.get(),
                                           pj_cstr(&ufrag, rem_attrs.ufrag.c_str()),
                                           pj_cstr(&pwd, rem_attrs.pwd.c_str()),
diff --git a/src/im/instant_messaging.cpp b/src/im/instant_messaging.cpp
index 20c8bf658fa2465fa03ee3d8fa76be7fd125dd40..30ef953ecd6fe2b5f05d609ac3df1a83cf14ef3a 100644
--- a/src/im/instant_messaging.cpp
+++ b/src/im/instant_messaging.cpp
@@ -182,12 +182,12 @@ InstantMessaging::appendMimePayloads(const std::map<std::string, std::string>& p
     for (const auto& pair : payloads) {
         const auto& m = buildMimeMultipartPart(pair.first, {}, pair.second);
         if (m.size() > max_message_size) {
-            RING_DBG("An %s payload is too large to be sent, the maximum lenght is %d",
+            RING_DBG("An %s payload is too large to be sent, the maximum lenght is %zu",
                      m.c_str(), max_message_size);
             continue;
         }
         if (m.size() + chunk.size() > max_message_size) {
-            RING_DBG("Some MIME payloads don't fit into the packet, splitting, max size is %d, the payload would be %d %d %d",
+            RING_DBG("Some MIME payloads don't fit into the packet, splitting, max size is %zu, the payload would be %zu %zu %zu",
                      max_message_size, m.size() + chunk.size(), m.size() , chunk.size()
             );
             chunk += urilist + footer;
diff --git a/src/manager.cpp b/src/manager.cpp
index 6f7ffb32224e02df37cb4f9776c43a9b63477961..93579169ee7e11db31db9f5ee14b38812a8f55aa 100644
--- a/src/manager.cpp
+++ b/src/manager.cpp
@@ -791,7 +791,7 @@ void
 Manager::removeConference(const std::string& conference_id)
 {
     RING_DBG("Remove conference %s", conference_id.c_str());
-    RING_DBG("number of participants: %u", conferenceMap_.size());
+    RING_DBG("number of participants: %zu", conferenceMap_.size());
     ConferenceMap::iterator iter = conferenceMap_.find(conference_id);
 
     std::shared_ptr<Conference> conf;
@@ -1212,7 +1212,7 @@ Manager::detachParticipant(const std::string& call_id)
         removeParticipant(call_id);
 
     } else {
-        RING_DBG("Unbind main participant from conference %d");
+        RING_DBG("Unbind main participant from conference");
         getRingBufferPool().unBindAll(RingBufferPool::DEFAULT_ID);
 
         if (not isConference(current_call_id)) {
@@ -1279,7 +1279,7 @@ Manager::processRemainingParticipants(Conference &conf)
     const std::string current_call_id(getCurrentCallId());
     ParticipantSet participants(conf.getParticipantList());
     const size_t n = participants.size();
-    RING_DBG("Process remaining %d participant(s) from conference %s",
+    RING_DBG("Process remaining %zu participant(s) from conference %s",
           n, conf.getConfID().c_str());
 
     if (n > 1) {
diff --git a/src/media/audio/alsa/alsalayer.cpp b/src/media/audio/alsa/alsalayer.cpp
index 33ef6d0b003f2e3f6ffe65f04bebf8a1fa7aa088..b2ddf9df324dcce33a57d7a7a12f922f29fa9b83 100644
--- a/src/media/audio/alsa/alsalayer.cpp
+++ b/src/media/audio/alsa/alsalayer.cpp
@@ -822,7 +822,7 @@ void AlsaLayer::audioCallback()
         playbackBuff_.resize(ringtoneAvailFrames);
 
         if (file_tone) {
-            RING_DBG("playback gain %d", playbackGain_);
+            RING_DBG("playback gain %.3f", playbackGain_);
             file_tone->getNext(playbackBuff_, playbackGain_);
         }
 
diff --git a/src/media/audio/audioloop.cpp b/src/media/audio/audioloop.cpp
index 8a181791ae6b0ab5ad2f55af8dc6ee20b8ce082c..e3928111342d924626f3306c76d7b99f58654274 100644
--- a/src/media/audio/audioloop.cpp
+++ b/src/media/audio/audioloop.cpp
@@ -75,7 +75,7 @@ AudioLoop::getNext(AudioBuffer& output, double gain)
         RING_ERR("Audio loop size is 0");
         return;
     } else if (pos >= buf_samples) {
-        RING_ERR("Invalid loop position %d", pos);
+        RING_ERR("Invalid loop position %zu", pos);
         return;
     }
 
diff --git a/src/media/audio/resampler.cpp b/src/media/audio/resampler.cpp
index 6dfa1f386b2b8ae43a241dbf8189fea9bd98f0fa..643bf35e569fe877d76e749cba016b206896ed91 100644
--- a/src/media/audio/resampler.cpp
+++ b/src/media/audio/resampler.cpp
@@ -103,7 +103,7 @@ void Resampler::resample(const AudioBuffer &dataIn, AudioBuffer &dataOut)
         RING_DBG("SRC channel number changed.");
     }
     if (nbChans != dataOut.channels()) {
-        RING_DBG("Output buffer had the wrong number of channels (in: %d, out: %d).", nbChans, dataOut.channels());
+        RING_DBG("Output buffer had the wrong number of channels (in: %zu, out: %u).", nbChans, dataOut.channels());
         dataOut.setChannelNum(nbChans);
     }
 
diff --git a/src/media/audio/ringbuffer.cpp b/src/media/audio/ringbuffer.cpp
index 7ae81718b4e0b3c229aaf08e63d102714ad36f2b..03c4a4f04d39718fe623235f813404106925faff 100644
--- a/src/media/audio/ringbuffer.cpp
+++ b/src/media/audio/ringbuffer.cpp
@@ -94,7 +94,7 @@ size_t RingBuffer::getLength(const std::string &call_id) const
 void
 RingBuffer::debug()
 {
-    RING_DBG("Start=%d; End=%d; BufferSize=%d", getSmallestReadOffset(), endPos_, buffer_.frames());
+    RING_DBG("Start=%zu; End=%zu; BufferSize=%zu", getSmallestReadOffset(), endPos_, buffer_.frames());
 }
 
 size_t RingBuffer::getReadOffset(const std::string &call_id) const
@@ -230,7 +230,7 @@ size_t RingBuffer::get(AudioBuffer& buf, const std::string &call_id)
     const size_t sample_num = buf.frames();
     size_t toCopy = std::min(sample_num, len);
     if (toCopy and toCopy != sample_num) {
-        RING_DBG("Partial get: %d/%d", toCopy, sample_num);
+        RING_DBG("Partial get: %zu/%zu", toCopy, sample_num);
     }
 
     const size_t copied = toCopy;
@@ -314,7 +314,7 @@ RingBuffer::discard(size_t toDiscard)
     for (auto & r : readoffsets_) {
         size_t dst = (r.second + buffer_size - endPos_) % buffer_size;
         if (dst < toDiscard) {
-            RING_DBG("%s : discarding: %d frames", r.first.c_str(), toDiscard - dst);
+            RING_DBG("%s : discarding: %zu frames", r.first.c_str(), toDiscard - dst);
             r.second = (r.second + toDiscard - dst) % buffer_size;
         }
     }
diff --git a/src/media/video/sinkclient.cpp b/src/media/video/sinkclient.cpp
index fcc61c5ebc71eda3cc022741f00e0f2d8bb79ce0..9fb574b4e108d02cb4b09c2190ea2a7ab986f5fc 100644
--- a/src/media/video/sinkclient.cpp
+++ b/src/media/video/sinkclient.cpp
@@ -104,7 +104,7 @@ class ShmHolder
 
         void unMapShmArea() noexcept {
             if (area_ != MAP_FAILED and ::munmap(area_, areaSize_) < 0) {
-                RING_ERR("ShmHolder[%s]: munmap(%u) failed with errno %d",
+                RING_ERR("ShmHolder[%s]: munmap(%zu) failed with errno %d",
                          openedName_.c_str(), areaSize_, errno);
             }
         }
@@ -186,13 +186,13 @@ ShmHolder::resizeArea(std::size_t frameSize) noexcept
 
     // full area size: +15 to take care of maximum padding size
     const auto areaSize = sizeof(SHMHeader) + 2 * frameSize + 15;
-    RING_DBG("ShmHolder[%s]: new sizes: f=%u, a=%u", openedName_.c_str(),
+    RING_DBG("ShmHolder[%s]: new sizes: f=%zu, a=%zu", openedName_.c_str(),
              frameSize, areaSize);
 
     unMapShmArea();
 
     if (::ftruncate(fd_, areaSize) < 0) {
-        RING_ERR("ShmHolder[%s]: ftruncate(%u) failed with errno %d",
+        RING_ERR("ShmHolder[%s]: ftruncate(%zu) failed with errno %d",
                  openedName_.c_str(), areaSize, errno);
         return false;
     }
@@ -203,7 +203,7 @@ ShmHolder::resizeArea(std::size_t frameSize) noexcept
 
     if (area_ == MAP_FAILED) {
         areaSize_ = 0;
-        RING_ERR("ShmHolder[%s]: mmap(%u) failed with errno %d",
+        RING_ERR("ShmHolder[%s]: mmap(%zu) failed with errno %d",
                  openedName_.c_str(), areaSize, errno);
         return false;
     }
diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp
index 2e5f9d68c053b5ace389c34a230c5cfee367231c..f295d6dd9ba8bd0f0cc982292041f5f95c095239 100644
--- a/src/ringdht/ringaccount.cpp
+++ b/src/ringdht/ringaccount.cpp
@@ -333,7 +333,8 @@ RingAccount::SIPStartCall(const std::shared_ptr<SIPCall>& call, IpAddr target)
     }
 
     RING_DBG("contact header: %.*s / %s -> %s / %.*s",
-          pjContact.slen, pjContact.ptr, from.c_str(), toUri.c_str(), pjTarget.slen, pjTarget.ptr);
+             (int)pjContact.slen, pjContact.ptr, from.c_str(), toUri.c_str(),
+             (int)pjTarget.slen, pjTarget.ptr);
 
     pjsip_dialog *dialog = NULL;
     if (pjsip_dlg_create_uac(pjsip_ua_instance(), &pjFrom, &pjContact, &pjTo, &pjTarget, &dialog) != PJ_SUCCESS) {
@@ -621,7 +622,7 @@ RingAccount::handleEvents()
                 c = pendingCalls_.erase(c);
             }
         } else if (ice->isFailed() || now - c->start > std::chrono::seconds(ICE_NEGOTIATION_TIMEOUT)) {
-            RING_WARN("[call:%s] ICE timeout : removing pending call (%d)",
+            RING_WARN("[call:%s] ICE timeout : removing pending call (%ld)",
                       call->getCallId().c_str(), call.use_count());
             if (c->call_key != dht::InfoHash())
                 dht_.cancelListen(c->call_key, c->listen_key.get());
@@ -736,7 +737,7 @@ RingAccount::doRegister_()
             std::vector<std::shared_ptr<dht::crypto::Certificate>> ret;
             if (cert)
                 ret.emplace_back(std::move(cert));
-            RING_DBG("Query for local certificate store: %s: %d found.", pk_id.toString().c_str(), ret.size());
+            RING_DBG("Query for local certificate store: %s: %zu found.", pk_id.toString().c_str(), ret.size());
             return ret;
         });
 
diff --git a/src/ringdht/sips_transport_ice.cpp b/src/ringdht/sips_transport_ice.cpp
index a738b94ffad1574d24b64a113af345e1a7bcaac4..ce554fff1aa58a2d669b3750c3aa6cef55a59971 100644
--- a/src/ringdht/sips_transport_ice.cpp
+++ b/src/ringdht/sips_transport_ice.cpp
@@ -719,7 +719,7 @@ SipsIceTransport::handleEvents()
     for (const auto& pair: ackBuf) {
         const auto& f = pair.first;
         f.tdata_op_key->tdata = nullptr;
-        RING_DBG("status: %d", pair.second);
+        RING_DBG("status: %ld", pair.second);
         if (f.tdata_op_key->callback)
             f.tdata_op_key->callback(getTransportBase(), f.tdata_op_key->token,
                                      pair.second);
@@ -738,7 +738,7 @@ SipsIceTransport::setup()
                 std::lock_guard<std::mutex> l(inputBuffMtx_);
                 tlsInputBuff_.emplace_back(buf, buf+len);
                 canRead_ = true;
-                RING_DBG("TLS(ice): rx %uB", len);
+                RING_DBG("TLS(ice): rx %zuB", len);
             }
             cv_.notify_all();
             return len;
diff --git a/src/sip/pres_sub_client.cpp b/src/sip/pres_sub_client.cpp
index 318f55d0006a7d057b91d465e70c00465676e6dc..70aac7b1768b5bcacb4c556e96c6b1832c0fe8d3 100644
--- a/src/sip/pres_sub_client.cpp
+++ b/src/sip/pres_sub_client.cpp
@@ -345,7 +345,7 @@ PresSubClient::PresSubClient(const std::string& uri, SIPPresence *pres) :
 
 PresSubClient::~PresSubClient()
 {
-    RING_DBG("Destroying pres_client object with uri %.*s", uri_.slen, uri_.ptr);
+    RING_DBG("Destroying pres_client object with uri %.*s", (int)uri_.slen, uri_.ptr);
     rescheduleTimer(PJ_FALSE, 0);
     unsubscribe();
     pj_pool_release(pool_);
@@ -394,7 +394,7 @@ void PresSubClient::rescheduleTimer(bool reschedule, unsigned msec)
         pj_time_val delay;
 
         RING_WARN("pres_client  %.*s will resubscribe in %u ms (reason: %.*s)",
-             uri_.slen, uri_.ptr, msec, (int) term_reason_.slen, term_reason_.ptr);
+                  (int)uri_.slen, uri_.ptr, msec, (int)term_reason_.slen, term_reason_.ptr);
         pj_timer_entry_init(&timer_, 0, this, &pres_client_timer_cb);
         delay.sec = 0;
         delay.msec = msec;
@@ -489,7 +489,7 @@ bool PresSubClient::unsubscribe()
     }
 
     /* Unsubscribe means send a subscribe with timeout=0s*/
-    RING_WARN("pres_client %.*s: unsubscribing..", uri_.slen, uri_.ptr);
+    RING_WARN("pres_client %.*s: unsubscribing..", (int)uri_.slen, uri_.ptr);
     retStatus = pjsip_pres_initiate(sub_, 0, &tdata);
 
     if (retStatus == PJ_SUCCESS) {
@@ -500,7 +500,7 @@ bool PresSubClient::unsubscribe()
     if (retStatus != PJ_SUCCESS and sub_) {
         pjsip_pres_terminate(sub_, PJ_FALSE);
         sub_ = NULL;
-        RING_WARN("Unable to unsubscribe presence", retStatus);
+        RING_WARN("Unable to unsubscribe presence (%d)", retStatus);
         unlock();
         return false;
     }
@@ -517,7 +517,7 @@ bool PresSubClient::subscribe()
 
     if (sub_ and dlg_) { //do not bother if already subscribed
         pjsip_evsub_terminate(sub_, PJ_FALSE);
-        RING_DBG("PreseSubClient %.*s: already subscribed. Refresh it.", uri_.slen, uri_.ptr);
+        RING_DBG("PreseSubClient %.*s: already subscribed. Refresh it.", (int)uri_.slen, uri_.ptr);
     }
 
     //subscribe
@@ -532,7 +532,7 @@ bool PresSubClient::subscribe()
     pres_callback.on_rx_notify = &pres_client_evsub_on_rx_notify;
 
     SIPAccount * acc = pres_->getAccount();
-    RING_DBG("PresSubClient %.*s: subscribing ", uri_.slen, uri_.ptr);
+    RING_DBG("PresSubClient %.*s: subscribing ", (int)uri_.slen, uri_.ptr);
 
 
     /* Create UAC dialog */
@@ -558,7 +558,7 @@ bool PresSubClient::subscribe()
 
     if (status != PJ_SUCCESS) {
         sub_ = NULL;
-        RING_WARN("Unable to create presence client", status);
+        RING_WARN("Unable to create presence client (%d)", status);
 
         /* This should destroy the dialog since there's no session
          * referencing it
@@ -591,7 +591,7 @@ bool PresSubClient::subscribe()
         if (sub_)
             pjsip_pres_terminate(sub_, PJ_FALSE);
         sub_ = NULL;
-        RING_WARN("Unable to create initial SUBSCRIBE", status);
+        RING_WARN("Unable to create initial SUBSCRIBE (%d)", status);
         return false;
     }
 
@@ -605,7 +605,7 @@ bool PresSubClient::subscribe()
         if (sub_)
             pjsip_pres_terminate(sub_, PJ_FALSE);
         sub_ = NULL;
-        RING_WARN("Unable to send initial SUBSCRIBE", status);
+        RING_WARN("Unable to send initial SUBSCRIBE (%d)", status);
         return false;
     }
 
diff --git a/src/sip/sdp.cpp b/src/sip/sdp.cpp
index 92b7982dc488748315a2ddc2da6e9de4c7457c4f..9fd4f32368f9402f78c383c9be8ce6d597d255f3 100644
--- a/src/sip/sdp.cpp
+++ b/src/sip/sdp.cpp
@@ -608,7 +608,8 @@ Sdp::getMediaSlots(const pjmedia_sdp_session* session, bool remote) const
             if (pjmedia_sdp_attr_get_rtpmap(rtpMapAttribute, &rtpmap) != PJ_SUCCESS ||
                 rtpmap.enc_name.slen == 0)
             {
-                RING_ERR("Could not find payload type %s in SDP", media->desc.fmt[j]);
+                RING_ERR("Could not find payload type %.*s in SDP",
+                        (int)media->desc.fmt[j].slen, media->desc.fmt[j].ptr);
                 descr.enabled = false;
                 continue;
             }
diff --git a/src/sip/sipaccount.cpp b/src/sip/sipaccount.cpp
index df7ed84dffdae53939ca5664fe396c0d935743ad..0331e5821a269020d0cc5856e21eece464c66d01 100644
--- a/src/sip/sipaccount.cpp
+++ b/src/sip/sipaccount.cpp
@@ -346,7 +346,7 @@ SIPAccount::SIPStartCall(std::shared_ptr<SIPCall>& call)
 
     pj_str_t pjContact = getContactHeader(transport->get());
     RING_DBG("contact header: %.*s / %s -> %s",
-          pjContact.slen, pjContact.ptr, from.c_str(), toUri.c_str());
+             (int)pjContact.slen, pjContact.ptr, from.c_str(), toUri.c_str());
 
     pjsip_dialog *dialog = NULL;
 
@@ -981,7 +981,7 @@ SIPAccount::sendRegister()
     if (transport_) {
         if (getUPnPActive() or not getPublishedSameasLocal() or (not received.empty() and received != getPublishedAddress())) {
             pjsip_host_port *via = getViaAddr();
-            RING_DBG("Setting VIA sent-by to %.*s:%d", via->host.slen, via->host.ptr, via->port);
+            RING_DBG("Setting VIA sent-by to %.*s:%d", (int)via->host.slen, via->host.ptr, via->port);
 
             if (pjsip_regc_set_via_sent_by(regc, via, transport_->get()) != PJ_SUCCESS)
                 throw VoipLinkException("Unable to set the \"sent-by\" field");
@@ -1233,7 +1233,7 @@ void SIPAccount::initTlsConfiguration()
     pj_cstr(&tlsSetting_.privkey_file, tlsPrivateKeyFile_.c_str());
     pj_cstr(&tlsSetting_.password, tlsPassword_.c_str());
 
-    RING_DBG("Using %u ciphers", ciphers_.size());
+    RING_DBG("Using %zu ciphers", ciphers_.size());
     tlsSetting_.ciphers_num = ciphers_.size();
     tlsSetting_.ciphers = &ciphers_.front();
 
@@ -2063,7 +2063,7 @@ SIPAccount::scheduleReregistration(pjsip_endpoint *endpt)
 
     pj_time_val_normalize(&delay);
 
-    RING_WARN("Scheduling re-registration retry in %u seconds..", delay.sec);
+    RING_WARN("Scheduling re-registration retry in %ld seconds..", delay.sec);
     auto_rereg_.timer.id = PJ_TRUE;
     if (pjsip_endpt_schedule_timer(endpt, &auto_rereg_.timer, &delay) != PJ_SUCCESS)
         auto_rereg_.timer.id = PJ_FALSE;
diff --git a/src/sip/sipcall.cpp b/src/sip/sipcall.cpp
index 168ffabdf209be5c6e7b2647309d449eff69eae4..ddbe52b87cf5e30f264f043d78fc8bdd597362c5 100644
--- a/src/sip/sipcall.cpp
+++ b/src/sip/sipcall.cpp
@@ -303,8 +303,7 @@ SIPCall::sendSIPInfo(const char *const body, const char *const subtype)
 void
 SIPCall::updateSDPFromSTUN()
 {
-    RING_WARN("[call:%s] SIPCall::updateSDPFromSTUN() not implemented", getCallId().c_str(),
-              __func__);
+    RING_WARN("[call:%s] SIPCall::updateSDPFromSTUN() not implemented", getCallId().c_str());
 }
 
 void
@@ -321,11 +320,11 @@ SIPCall::terminateSipSession(int status)
                 sip_utils::addContactHeader(&contact, tdata);
                 ret = pjsip_inv_send_msg(inv.get(), tdata);
                 if (ret != PJ_SUCCESS)
-                    RING_ERR("[call:%s] failed to send terminate msg, SIP error %d (%s)",
+                    RING_ERR("[call:%s] failed to send terminate msg, SIP error (%s)",
                              getCallId().c_str(), sip_utils::sip_strerror(ret).c_str());
             }
         } else
-            RING_ERR("[call:%s] failed to terminate INVITE@%p, SIP error %d (%s)",
+            RING_ERR("[call:%s] failed to terminate INVITE@%p, SIP error (%s)",
                      getCallId().c_str(), inv.get(), sip_utils::sip_strerror(ret).c_str());
     }
 
@@ -363,7 +362,8 @@ SIPCall::answer()
 
     // contactStr must stay in scope as long as tdata
     if (contactHeader_.slen) {
-        RING_DBG("[call:%s] Answering with contact header: %.*s", getCallId().c_str(), contactHeader_.slen, contactHeader_.ptr);
+        RING_DBG("[call:%s] Answering with contact header: %.*s",
+                 getCallId().c_str(), (int)contactHeader_.slen, contactHeader_.ptr);
         sip_utils::addContactHeader(&contactHeader_, tdata);
     }
 
@@ -555,7 +555,7 @@ SIPCall::transfer(const std::string& to)
 
     toUri = account.getToUri(to);
     pj_cstr(&dst, toUri.c_str());
-    RING_DBG("[call:%s] Transferring to %.*s", getCallId().c_str(), dst.slen, dst.ptr);
+    RING_DBG("[call:%s] Transferring to %.*s", getCallId().c_str(), (int)dst.slen, dst.ptr);
 
     if (!transferCommon(&dst))
         throw VoipLinkException("Couldn't transfer");
diff --git a/src/sip/sippresence.cpp b/src/sip/sippresence.cpp
index 6027a2a5131f7dd94efe8d548e3163c6c90aa253..94ce8acd65190be3abbd4769bfcea52fd7fb35ef 100644
--- a/src/sip/sippresence.cpp
+++ b/src/sip/sippresence.cpp
@@ -239,7 +239,7 @@ void SIPPresence::addPresSubClient(PresSubClient *c)
 {
     if (sub_client_list_.size() < MAX_N_SUB_CLIENT) {
         sub_client_list_.push_back(c);
-        RING_DBG("New Presence_subscription_client added (list[%i]).", sub_client_list_.size());
+        RING_DBG("New Presence_subscription_client added (list[%zu]).", sub_client_list_.size());
     } else {
         RING_WARN("Max Presence_subscription_client is reach.");
         // let the client alive //delete c;
@@ -322,7 +322,7 @@ void SIPPresence::fillDoc(pjsip_tx_data *tdata, const pres_msg_data *msg_data)
     while (hdr && hdr != &msg_data->hdr_list) {
         pjsip_hdr *new_hdr;
         new_hdr = (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, hdr);
-        RING_DBG("adding header", new_hdr->name.ptr);
+        RING_DBG("adding header %p", new_hdr->name.ptr);
         pjsip_msg_add_hdr(tdata->msg, new_hdr);
         hdr = hdr->next;
     }
@@ -420,7 +420,7 @@ SIPPresence::send_publish(SIPPresence * pres)
     pj_str_t from = pj_strdup3(pres->pool_, acc->getFromUri().c_str());
 
     if (status != PJ_SUCCESS) {
-        RING_ERR("Error creating PUBLISH request", status);
+        RING_ERR("Error creating PUBLISH request %d", status);
         goto on_error;
     }
 
diff --git a/src/sip/siptransport.cpp b/src/sip/siptransport.cpp
index ff3a56ae3150400ffa6f708efef6a47cac296be4..222ad80d364b4501f962205b58889b194e262fbb 100644
--- a/src/sip/siptransport.cpp
+++ b/src/sip/siptransport.cpp
@@ -89,7 +89,7 @@ SipTransport::SipTransport(pjsip_transport* t)
     // Set pointer here, right after the successful pjsip_transport_add_ref
     transport_.reset(t);
 
-    RING_DBG("SipTransport@%p {tr=%p {rc=%u}}",
+    RING_DBG("SipTransport@%p {tr=%p {rc=%ld}}",
              this, transport_.get(), pj_atomic_get(transport_->ref_cnt));
 }
 
@@ -102,7 +102,7 @@ SipTransport::SipTransport(pjsip_transport* t,
 
 SipTransport::~SipTransport()
 {
-    RING_DBG("~SipTransport@%p {tr=%p {rc=%u}}",
+    RING_DBG("~SipTransport@%p {tr=%p {rc=%ld}}",
              this, transport_.get(), pj_atomic_get(transport_->ref_cnt));
 }
 
diff --git a/src/sip/sipvoiplink.cpp b/src/sip/sipvoiplink.cpp
index b6fdce7c58be031ce1b334662e5c2bd4cae0f3ef..1953497cb9b82721f9707fd308c14662d3025cbb 100644
--- a/src/sip/sipvoiplink.cpp
+++ b/src/sip/sipvoiplink.cpp
@@ -600,7 +600,7 @@ SIPVoIPLink::~SIPVoIPLink()
     // may be called and another instance of SIPVoIPLink can be re-created!
 
     if (not Manager::instance().callFactory.empty<SIPCall>())
-        RING_ERR("%d SIP calls remains!",
+        RING_ERR("%zu SIP calls remains!",
                  Manager::instance().callFactory.callCount<SIPCall>());
 
     sipTransportBroker->shutdown();
@@ -690,7 +690,7 @@ SIPVoIPLink::handleEvents()
     static const pj_time_val timeout = {0, 0}; // polling
     auto ret = pjsip_endpt_handle_events(endpt_, &timeout);
     if (ret != PJ_SUCCESS)
-        RING_ERR("pjsip_endpt_handle_events failed with error %d: %s",
+        RING_ERR("pjsip_endpt_handle_events failed with error %s",
                  sip_utils::sip_strerror(ret).c_str());
 
 #ifdef RING_VIDEO
@@ -700,7 +700,7 @@ SIPVoIPLink::handleEvents()
 
 void SIPVoIPLink::registerKeepAliveTimer(pj_timer_entry &timer, pj_time_val &delay)
 {
-    RING_DBG("Register new keep alive timer %d with delay %d", timer.id, delay.sec);
+    RING_DBG("Register new keep alive timer %d with delay %ld", timer.id, delay.sec);
 
     if (timer.id == -1)
         RING_WARN("Timer already scheduled");
@@ -813,7 +813,7 @@ invite_session_state_changed_cb(pjsip_inv_session *inv, pjsip_event *ev)
 
         RING_DBG("[call:%s] INVITE@%p state changed to %d (%s): cause=%d, tsx@%p status %d (%.*s)",
                  call->getCallId().c_str(), inv, inv->state, pjsip_inv_state_name(inv->state),
-                 inv->cause, tsx, status_code, description->slen, description->ptr);
+                 inv->cause, tsx, status_code, (int)description->slen, description->ptr);
     } else {
         status_code = 0;
         RING_DBG("[call:%s] INVITE@%p state changed to %d (%s): cause=%d (TX_MSG)",
@@ -1055,7 +1055,7 @@ replyToRequest(pjsip_inv_session* inv, pjsip_rx_data* rdata, int status_code)
 {
     const auto ret = pjsip_dlg_respond(inv->dlg, rdata, status_code, nullptr, nullptr, nullptr);
     if (ret != PJ_SUCCESS)
-        RING_WARN("SIP: failed to reply %u to request");
+        RING_WARN("SIP: failed to reply %d to request", status_code);
 }
 
 static void
@@ -1180,7 +1180,7 @@ transaction_state_changed_cb(pjsip_inv_session* inv, pjsip_transaction* tsx, pjs
 
     // Using method name to dispatch
     const std::string methodName {msg->line.req.method.name.ptr, (unsigned)msg->line.req.method.name.slen};
-    RING_DBG("[INVITE:%p] RX SIP method %d (%#s)", inv, msg->line.req.method.id, methodName.c_str());
+    RING_DBG("[INVITE:%p] RX SIP method %d (%s)", inv, msg->line.req.method.id, methodName.c_str());
 
 #ifdef DEBUG_SIP_REQUEST_MSG
     char msgbuf[1000];
@@ -1392,7 +1392,7 @@ SIPVoIPLink::findLocalAddressFromSTUN(pjsip_transport* transport,
     switch (stunStatus) {
         case PJLIB_UTIL_ESTUNNOTRESPOND:
            RING_ERR("No response from STUN server %.*s",
-                    stunServerName->slen, stunServerName->ptr);
+                    (int)stunServerName->slen, stunServerName->ptr);
            return false;
 
         case PJLIB_UTIL_ESTUNSYMMETRIC:
@@ -1403,13 +1403,13 @@ SIPVoIPLink::findLocalAddressFromSTUN(pjsip_transport* transport,
             port = pj_sockaddr_in_get_port(&mapped_addr);
             addr = IpAddr((const pj_sockaddr&)mapped_addr).toString();
             RING_DBG("STUN server %.*s replied '%s:%u'",
-                     stunServerName->slen, stunServerName->ptr,
+                     (int)stunServerName->slen, stunServerName->ptr,
                      addr.c_str(), port);
             return true;
 
         default: // use given address, silent any not handled error
             RING_WARN("Error from STUN server %.*s, using source address",
-                      stunServerName->slen, stunServerName->ptr);
+                      (int)stunServerName->slen, stunServerName->ptr);
             return false;
     }
 }