mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00
fix paramter warning and libgit2 error
Add directives to use git_comit * const for final parameter when calling git_commit_create_buffer function using v.1.8.0, v1.8.1, and v1.8.3 Change-Id: Iffc023b0ae87f14aea15b360d00da76933a81cc4
This commit is contained in:
@ -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]);
|
||||
|
@ -237,11 +237,10 @@ commitInRepo(const std::string& path, std::shared_ptr<JamiAccount> 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(
|
||||
|
@ -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()};
|
||||
|
Reference in New Issue
Block a user