Commit 3da73c40fcd5bbc92659abb33cec9584004139eb

nulltoken 2012-11-29T21:33:31

Fix compilation warnings

diff --git a/tests-clar/network/fetch.c b/tests-clar/network/fetch.c
index 84c9472..623352f 100644
--- a/tests-clar/network/fetch.c
+++ b/tests-clar/network/fetch.c
@@ -79,6 +79,9 @@ void test_network_fetch__no_tags_http(void)
 static void transferProgressCallback(const git_transfer_progress *stats, void *payload)
 {
 	bool *invoked = (bool *)payload;
+
+	GIT_UNUSED(stats);
+
 	*invoked = true;
 }
 
diff --git a/tests-clar/refs/branches/tracking.c b/tests-clar/refs/branches/tracking.c
index e8b2f24..7af5f97 100644
--- a/tests-clar/refs/branches/tracking.c
+++ b/tests-clar/refs/branches/tracking.c
@@ -61,7 +61,7 @@ void test_refs_branches_tracking__trying_to_retrieve_a_remote_tracking_reference
 	cl_assert_equal_i(GIT_ENOTFOUND, git_branch_tracking(&tracking, branch));
 }
 
-static void assert_merge_and_or_remote_key_missing(git_repository *repository, git_object *target, const char *entry_name)
+static void assert_merge_and_or_remote_key_missing(git_repository *repository, const git_commit *target, const char *entry_name)
 {
 	git_reference *branch;
 
@@ -76,19 +76,19 @@ void test_refs_branches_tracking__retrieve_a_remote_tracking_reference_from_a_br
 {
 	git_reference *head;
 	git_repository *repository;
-	git_object *target;
+	git_commit *target;
 
 	repository = cl_git_sandbox_init("testrepo.git");
 
 	cl_git_pass(git_repository_head(&head, repository));
-	cl_git_pass(git_reference_peel(&target, head, GIT_OBJ_COMMIT));
+	cl_git_pass(git_reference_peel(((git_object **)&target), head, GIT_OBJ_COMMIT));
 	git_reference_free(head);
 
 	assert_merge_and_or_remote_key_missing(repository, target, "remoteless");
 	assert_merge_and_or_remote_key_missing(repository, target, "mergeless");
 	assert_merge_and_or_remote_key_missing(repository, target, "mergeandremoteless");
 
-	git_object_free(target);
+	git_commit_free(target);
 
 	cl_git_sandbox_cleanup();
 }