diff --git a/src/security/certstore.cpp b/src/security/certstore.cpp index 78ecbfa8949d9342cc75479a4f32f1570062b127..309c838feb650511d589e4b2e1f076159e31e355 100644 --- a/src/security/certstore.cpp +++ b/src/security/certstore.cpp @@ -84,8 +84,7 @@ void CertificateStore::loadRevocations(crypto::Certificate& crt) const { auto dir = crlPath_+DIR_SEPARATOR_CH+crt.getId().toString(); - auto crl_dir_content = fileutils::readDirectory(dir); - for (const auto& crl : crl_dir_content) { + for (const auto& crl : fileutils::readDirectory(dir)) { try { crt.addRevocationList(std::make_shared<crypto::RevocationList>(fileutils::loadFile(dir+DIR_SEPARATOR_CH+crl))); } catch (const std::exception& e) { diff --git a/src/sip/sipcall.cpp b/src/sip/sipcall.cpp index 386e18a8ddaee85d2c7a4f86d3d2a54fea26acae..a541f1a5346d286a6cf0f2049a251043309c10c1 100644 --- a/src/sip/sipcall.cpp +++ b/src/sip/sipcall.cpp @@ -243,11 +243,11 @@ SIPCall::sendSIPInfo(const char *const body, const char *const subtype) if (not inv or not inv->dlg) throw VoipLinkException("Couldn't get invite dialog"); - pj_str_t methodName = CONST_PJ_STR("INFO"); + constexpr pj_str_t methodName = CONST_PJ_STR("INFO"); constexpr pj_str_t type = CONST_PJ_STR("application"); pjsip_method method; - pjsip_method_init_np(&method, &methodName); + pjsip_method_init_np(&method, (pj_str_t*)&methodName); /* Create request message. */ pjsip_tx_data *tdata;