diff --git a/src/connectivity/security/tlsvalidator.cpp b/src/connectivity/security/tlsvalidator.cpp index a3bde16a3..be02dc45b 100644 --- a/src/connectivity/security/tlsvalidator.cpp +++ b/src/connectivity/security/tlsvalidator.cpp @@ -309,7 +309,7 @@ TlsValidator::~TlsValidator() {} * @todo The date should be validated, this is currently not an issue */ std::string -TlsValidator::getStringValue(const TlsValidator::CertificateCheck check, +TlsValidator::getStringValue([[maybe_unused]]const TlsValidator::CertificateCheck check, const TlsValidator::CheckResult result) { assert(acceptedCheckValuesResult[enforcedCheckType[check]][result.first]); diff --git a/test/unitTest/conversation/conversationcommon.cpp b/test/unitTest/conversation/conversationcommon.cpp index 005ec3be0..380fa1ff6 100644 --- a/test/unitTest/conversation/conversationcommon.cpp +++ b/test/unitTest/conversation/conversationcommon.cpp @@ -237,11 +237,10 @@ commitInRepo(const std::string& path, std::shared_ptr account, cons GitCommit head_commit {head_ptr, git_commit_free}; git_buf to_sign = {}; -#if( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 ) - // For libgit2 version 1.8.0 and above +#if LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8 && \ + (LIBGIT2_VER_REVISION == 0 || LIBGIT2_VER_REVISION == 1 || LIBGIT2_VER_REVISION == 3) git_commit* const head_ref[1] = {head_commit.get()}; #else - // For libgit2 versions older than 1.8.0 const git_commit* head_ref[1] = {head_commit.get()}; #endif if (git_commit_create_buffer( diff --git a/test/unitTest/conversationRepository/conversationRepository.cpp b/test/unitTest/conversationRepository/conversationRepository.cpp index a299a1202..2ab451e7e 100644 --- a/test/unitTest/conversationRepository/conversationRepository.cpp +++ b/test/unitTest/conversationRepository/conversationRepository.cpp @@ -293,8 +293,8 @@ ConversationRepositoryTest::addCommit(git_repository* repo, GitTree tree = {tree_ptr, git_tree_free}; git_buf to_sign = {}; -#if( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 ) - // For libgit2 version 1.8.0 and above +#if LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8 && \ + (LIBGIT2_VER_REVISION == 0 || LIBGIT2_VER_REVISION == 1 || LIBGIT2_VER_REVISION == 3) git_commit* const head_ref[1] = {head_commit.get()}; #else const git_commit* head_ref[1] = {head_commit.get()};