From 2b848e47c1491fe0b6e987400b1a466c0f18861a Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Wed, 26 Mar 2014 12:33:37 -0500 Subject: [PATCH 1/2] Decorate unused params as unused in revwalk::hidecb tests --- tests/revwalk/hidecb.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/revwalk/hidecb.c b/tests/revwalk/hidecb.c index c13a17747..26ff183fa 100644 --- a/tests/revwalk/hidecb.c +++ b/tests/revwalk/hidecb.c @@ -48,18 +48,27 @@ void test_revwalk_hidecb__cleanup(void) /* Hide all commits */ static int hide_every_commit_cb(const git_oid *commit_id, void *data) { + GIT_UNUSED(commit_id); + GIT_UNUSED(data); + return 1; } /* Do not hide anything */ static int hide_none_cb(const git_oid *commit_id, void *data) { + GIT_UNUSED(commit_id); + GIT_UNUSED(data); + return 0; } /* Hide some commits */ static int hide_commit_cb(const git_oid *commit_id, void *data) { + GIT_UNUSED(commit_id); + GIT_UNUSED(data); + if (0 == git_oid_cmp(commit_id, &commit_ids[5])) return 1; else From 9cb99e8b853bb3d9ddec3748494a0ac34550849b Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Wed, 26 Mar 2014 12:43:41 -0500 Subject: [PATCH 2/2] Free temporary merge index --- src/merge.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/merge.c b/src/merge.c index 42fbd79c9..24b7d37ce 100644 --- a/src/merge.c +++ b/src/merge.c @@ -2629,9 +2629,8 @@ int git_merge( on_error: merge_state_cleanup(repo); - git_index_free(index_new); - done: + git_index_free(index_new); git_index_free(index_repo); git_tree_free(ancestor_tree);