Fix compilation warnings
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 38 39 40 41 42 43 44 45 46 47 48 49 50
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();
}