mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 20:42:23 +00:00
Fix Travis compilation warnings
This commit is contained in:
parent
2a3b3e0324
commit
5b524d6902
@ -842,7 +842,7 @@ static int diff_patch_line_cb(
|
|||||||
{
|
{
|
||||||
git_diff_patch *patch = payload;
|
git_diff_patch *patch = payload;
|
||||||
diff_patch_hunk *hunk;
|
diff_patch_hunk *hunk;
|
||||||
diff_patch_line *last, *line;
|
diff_patch_line *line;
|
||||||
|
|
||||||
GIT_UNUSED(delta);
|
GIT_UNUSED(delta);
|
||||||
GIT_UNUSED(range);
|
GIT_UNUSED(range);
|
||||||
@ -872,8 +872,6 @@ static int diff_patch_line_cb(
|
|||||||
patch->lines_asize = new_size;
|
patch->lines_asize = new_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
last = (patch->lines_size > 0) ?
|
|
||||||
&patch->lines[patch->lines_size - 1] : NULL;
|
|
||||||
line = &patch->lines[patch->lines_size++];
|
line = &patch->lines[patch->lines_size++];
|
||||||
|
|
||||||
line->ptr = content;
|
line->ptr = content;
|
||||||
|
@ -367,7 +367,6 @@ void assert_conflict(
|
|||||||
git_object *hack_tree;
|
git_object *hack_tree;
|
||||||
git_reference *branch, *head;
|
git_reference *branch, *head;
|
||||||
git_buf file_path = GIT_BUF_INIT;
|
git_buf file_path = GIT_BUF_INIT;
|
||||||
git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
|
|
||||||
|
|
||||||
cl_git_pass(git_repository_index(&index, g_repo));
|
cl_git_pass(git_repository_index(&index, g_repo));
|
||||||
|
|
||||||
@ -383,7 +382,7 @@ void assert_conflict(
|
|||||||
git_reference_free(branch);
|
git_reference_free(branch);
|
||||||
|
|
||||||
/* Checkout the parent */
|
/* Checkout the parent */
|
||||||
opts.checkout_strategy = GIT_CHECKOUT_FORCE;
|
g_opts.checkout_strategy = GIT_CHECKOUT_FORCE;
|
||||||
cl_git_pass(git_checkout_tree(g_repo, g_object, &g_opts));
|
cl_git_pass(git_checkout_tree(g_repo, g_object, &g_opts));
|
||||||
|
|
||||||
/* Hack-ishy workaound to ensure *all* the index entries
|
/* Hack-ishy workaound to ensure *all* the index entries
|
||||||
@ -403,7 +402,7 @@ void assert_conflict(
|
|||||||
/* Trying to checkout the original commit */
|
/* Trying to checkout the original commit */
|
||||||
cl_git_pass(git_revparse_single(&g_object, g_repo, commit_sha));
|
cl_git_pass(git_revparse_single(&g_object, g_repo, commit_sha));
|
||||||
|
|
||||||
opts.checkout_strategy = GIT_CHECKOUT_SAFE;
|
g_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
|
||||||
cl_assert_equal_i(
|
cl_assert_equal_i(
|
||||||
GIT_EMERGECONFLICT, git_checkout_tree(g_repo, g_object, &g_opts));
|
GIT_EMERGECONFLICT, git_checkout_tree(g_repo, g_object, &g_opts));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user