Commit dab55bef589a158f567e4c3477f3d9b9ebe1d1f8

Carlos Martín Nieto 2015-11-08T06:03:57

Fix warnings and a leak

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);
 }