Fix warnings and a leak
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/src/odb_mempack.c b/src/odb_mempack.c
index 25f3059..73accab 100644
--- a/src/odb_mempack.c
+++ b/src/odb_mempack.c
@@ -163,7 +163,7 @@ static void impl__free(git_odb_backend *_backend)
{
struct memory_packer_db *db = (struct memory_packer_db *)_backend;
- git_mempack_reset(db);
+ git_mempack_reset((git_odb_backend *) db);
git_oidmap_free(db->objects);
git__free(db);
diff --git a/tests/revwalk/basic.c b/tests/revwalk/basic.c
index d8236ce..829d8e8 100644
--- a/tests/revwalk/basic.c
+++ b/tests/revwalk/basic.c
@@ -456,7 +456,7 @@ void test_revwalk_basic__big_timestamp(void)
cl_git_pass(git_signature_new(&sig, "Joe", "joe@example.com", 2399662595, 0));
cl_git_pass(git_commit_tree(&tree, tip));
- cl_git_pass(git_commit_create(&id, _repo, "HEAD", sig, sig, NULL, "some message", tree, 1, &tip));
+ cl_git_pass(git_commit_create(&id, _repo, "HEAD", sig, sig, NULL, "some message", tree, 1, (const git_commit **) &tip));
cl_git_pass(git_revwalk_push_head(_walk));
diff --git a/tests/revwalk/mergebase.c b/tests/revwalk/mergebase.c
index d486bba..ee078b3 100644
--- a/tests/revwalk/mergebase.c
+++ b/tests/revwalk/mergebase.c
@@ -509,5 +509,6 @@ void test_revwalk_mergebase__remove_redundant(void)
cl_assert_equal_i(1, result.count);
cl_assert_equal_oid(&base, &result.ids[0]);
+ git_oidarray_free(&result);
git_repository_free(repo);
}