summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2013-12-09 10:25:36 -0500
committerEdward Thomson <ethomson@microsoft.com>2013-12-09 11:40:44 -0500
commit5588f0736089ab00e12cb7ea7c8143ec666738e6 (patch)
tree1f877c23d223d4dedabafb4bc6c793efe82f9fdc /tests
parent07c5dc84fd486b380d618319b4852591d355bd81 (diff)
downloadlibgit2-5588f0736089ab00e12cb7ea7c8143ec666738e6.tar.gz
Clean up warnings
Diffstat (limited to 'tests')
-rw-r--r--tests/blame/harder.c8
-rw-r--r--tests/merge/merge_helpers.c1
-rw-r--r--tests/merge/trees/commits.c22
-rw-r--r--tests/refs/branches/create.c3
4 files changed, 10 insertions, 24 deletions
diff --git a/tests/blame/harder.c b/tests/blame/harder.c
index 7c4dd4f74..e77741720 100644
--- a/tests/blame/harder.c
+++ b/tests/blame/harder.c
@@ -36,6 +36,8 @@ void test_blame_harder__m(void)
/* TODO */
git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
+ GIT_UNUSED(opts);
+
opts.flags = GIT_BLAME_TRACK_COPIES_SAME_FILE;
}
@@ -44,6 +46,8 @@ void test_blame_harder__c(void)
{
git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
+ GIT_UNUSED(opts);
+
/* Attribute the first hunk in b.txt to (E), since it was cut/pasted from
* a.txt in (D).
*/
@@ -54,6 +58,8 @@ void test_blame_harder__cc(void)
{
git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
+ GIT_UNUSED(opts);
+
/* Attribute the second hunk in b.txt to (E), since it was copy/pasted from
* a.txt in (C).
*/
@@ -63,6 +69,8 @@ void test_blame_harder__cc(void)
void test_blame_harder__ccc(void)
{
git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
+
+ GIT_UNUSED(opts);
/* Attribute the third hunk in b.txt to (E). This hunk was deleted from
* a.txt in (D), but reintroduced in (B).
diff --git a/tests/merge/merge_helpers.c b/tests/merge/merge_helpers.c
index 7ca1e6522..5660179a7 100644
--- a/tests/merge/merge_helpers.c
+++ b/tests/merge/merge_helpers.c
@@ -60,7 +60,6 @@ int merge_commits_from_branches(
git_commit *our_commit, *their_commit;
git_oid our_oid, their_oid;
git_buf branch_buf = GIT_BUF_INIT;
- int error;
git_buf_printf(&branch_buf, "%s%s", GIT_REFS_HEADS_DIR, ours_name);
cl_git_pass(git_reference_name_to_id(&our_oid, repo, branch_buf.ptr));
diff --git a/tests/merge/trees/commits.c b/tests/merge/trees/commits.c
index 92680c3c7..f8f4fbacb 100644
--- a/tests/merge/trees/commits.c
+++ b/tests/merge/trees/commits.c
@@ -29,28 +29,6 @@ void test_merge_trees_commits__cleanup(void)
cl_git_sandbox_cleanup();
}
-static void merge_commits(
- git_index **out,
- git_repository *repo,
- const char *our_oidstr,
- const char *their_oidstr,
- const git_merge_tree_opts *opts)
-{
- git_oid our_oid, their_oid;
- git_commit *our_commit, *their_commit;
-
- cl_git_pass(git_oid_fromstr(&our_oid, our_oidstr));
- cl_git_pass(git_oid_fromstr(&their_oid, their_oidstr));
-
- cl_git_pass(git_commit_lookup(&our_commit, repo, &our_oid));
- cl_git_pass(git_commit_lookup(&their_commit, repo, &their_oid));
-
- cl_git_pass(git_merge_commits(out, repo, our_commit, their_commit, opts));
-
- git_commit_free(our_commit);
- git_commit_free(their_commit);
-}
-
void test_merge_trees_commits__automerge(void)
{
git_index *index;
diff --git a/tests/refs/branches/create.c b/tests/refs/branches/create.c
index 693a592a3..e4ad6683e 100644
--- a/tests/refs/branches/create.c
+++ b/tests/refs/branches/create.c
@@ -73,4 +73,5 @@ void test_refs_branches_create__creating_a_branch_with_an_invalid_name_returns_E
cl_assert_equal_i(GIT_EINVALIDSPEC,
git_branch_create(&branch, repo, "inv@{id", target, 0));
-} \ No newline at end of file
+}
+