mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 13:48:41 +00:00
Fixed build warnings on Xcode 6.1
This commit is contained in:
parent
be5fda7587
commit
9f3c18e2ac
@ -53,7 +53,7 @@ static int load_alternates(git_odb *odb, const char *objects_dir, int alternate_
|
||||
int git_odb__format_object_header(char *hdr, size_t n, git_off_t obj_len, git_otype obj_type)
|
||||
{
|
||||
const char *type_str = git_object_type2string(obj_type);
|
||||
int len = p_snprintf(hdr, n, "%s %"PRIuZ, type_str, obj_len);
|
||||
int len = p_snprintf(hdr, n, "%s %lld", type_str, obj_len);
|
||||
assert(len > 0 && len <= (int)n);
|
||||
return len+1;
|
||||
}
|
||||
|
@ -209,6 +209,12 @@ int git_cred_ssh_key_memory_new(
|
||||
passphrase,
|
||||
GIT_CREDTYPE_SSH_MEMORY);
|
||||
#else
|
||||
GIT_UNUSED(cred);
|
||||
GIT_UNUSED(username);
|
||||
GIT_UNUSED(publickey);
|
||||
GIT_UNUSED(privatekey);
|
||||
GIT_UNUSED(passphrase);
|
||||
|
||||
giterr_set(GITERR_INVALID,
|
||||
"This version of libgit2 was not built with ssh memory credentials.");
|
||||
return -1;
|
||||
|
@ -492,7 +492,7 @@ void test_core_path__13_cannot_prettify_a_non_existing_file(void)
|
||||
{
|
||||
git_buf p = GIT_BUF_INIT;
|
||||
|
||||
cl_must_pass(git_path_exists(NON_EXISTING_FILEPATH) == false);
|
||||
cl_assert_equal_b(git_path_exists(NON_EXISTING_FILEPATH), false);
|
||||
cl_assert_equal_i(GIT_ENOTFOUND, git_path_prettify(&p, NON_EXISTING_FILEPATH, NULL));
|
||||
cl_assert_equal_i(GIT_ENOTFOUND, git_path_prettify(&p, NON_EXISTING_FILEPATH "/so-do-i", NULL));
|
||||
|
||||
|
@ -168,7 +168,7 @@ static void do_conflicted_diff(diff_expects *exp, unsigned long flags)
|
||||
const char *a_commit = "26a125ee1bf"; /* the current HEAD */
|
||||
git_tree *a = resolve_commit_oid_to_tree(g_repo, a_commit);
|
||||
git_diff_options opts = GIT_DIFF_OPTIONS_INIT;
|
||||
git_index_entry ancestor = {0}, ours = {0}, theirs = {0};
|
||||
git_index_entry ancestor = {{0}}, ours = {{0}}, theirs = {{0}};
|
||||
git_diff *diff = NULL;
|
||||
git_index *index;
|
||||
|
||||
|
@ -73,7 +73,7 @@ void test_diff_workdir__to_index_with_conflicts(void)
|
||||
git_diff_options opts = GIT_DIFF_OPTIONS_INIT;
|
||||
git_diff *diff = NULL;
|
||||
git_index *index;
|
||||
git_index_entry our_entry = {0}, their_entry = {0};
|
||||
git_index_entry our_entry = {{0}}, their_entry = {{0}};
|
||||
diff_expects exp = {0};
|
||||
|
||||
g_repo = cl_git_sandbox_init("status");
|
||||
|
@ -288,7 +288,6 @@ void test_index_addall__repo_lifecycle(void)
|
||||
void test_index_addall__files_in_folders(void)
|
||||
{
|
||||
git_index *index;
|
||||
git_strarray paths = { NULL, 0 };
|
||||
|
||||
addall_create_test_repo(true);
|
||||
|
||||
@ -408,7 +407,7 @@ void test_index_addall__adds_conflicts(void)
|
||||
cl_git_pass(git_reference_lookup(&ref, g_repo, "refs/heads/branch"));
|
||||
cl_git_pass(git_annotated_commit_from_ref(&annotated, g_repo, ref));
|
||||
|
||||
cl_git_pass(git_merge(g_repo, &annotated, 1, NULL, NULL));
|
||||
cl_git_pass(git_merge(g_repo, (const git_annotated_commit**)&annotated, 1, NULL, NULL));
|
||||
check_status(g_repo, 0, 1, 2, 0, 0, 0, 0, 1);
|
||||
|
||||
cl_git_pass(git_index_add_all(index, NULL, 0, NULL, NULL));
|
||||
@ -433,7 +432,7 @@ void test_index_addall__removes_deleted_conflicted_files(void)
|
||||
cl_git_pass(git_reference_lookup(&ref, g_repo, "refs/heads/branch"));
|
||||
cl_git_pass(git_annotated_commit_from_ref(&annotated, g_repo, ref));
|
||||
|
||||
cl_git_pass(git_merge(g_repo, &annotated, 1, NULL, NULL));
|
||||
cl_git_pass(git_merge(g_repo, (const git_annotated_commit**)&annotated, 1, NULL, NULL));
|
||||
check_status(g_repo, 0, 1, 2, 0, 0, 0, 0, 1);
|
||||
|
||||
cl_git_rmfile("merge-resolve/conflicting.txt");
|
||||
|
@ -254,6 +254,11 @@ int checkout_notify(
|
||||
{
|
||||
struct seen_paths *seen_paths = (struct seen_paths *)payload;
|
||||
|
||||
GIT_UNUSED(why);
|
||||
GIT_UNUSED(baseline);
|
||||
GIT_UNUSED(target);
|
||||
GIT_UNUSED(workdir);
|
||||
|
||||
if (strcmp(path, "what") == 0)
|
||||
seen_paths->what = 1;
|
||||
else if (strcmp(path, "how") == 0)
|
||||
@ -318,6 +323,8 @@ int aborting_progress_cb(
|
||||
git_stash_apply_progress_t progress,
|
||||
void *payload)
|
||||
{
|
||||
GIT_UNUSED(payload);
|
||||
|
||||
if (progress == GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED)
|
||||
return -44;
|
||||
|
||||
@ -327,7 +334,6 @@ int aborting_progress_cb(
|
||||
void test_stash_apply__progress_cb_can_abort(void)
|
||||
{
|
||||
git_stash_apply_options opts = GIT_STASH_APPLY_OPTIONS_INIT;
|
||||
git_stash_apply_progress_t progress = GIT_STASH_APPLY_PROGRESS_NONE;
|
||||
|
||||
opts.progress_cb = aborting_progress_cb;
|
||||
|
||||
|
@ -649,10 +649,10 @@ void test_status_worktree__conflict_has_no_oid(void)
|
||||
{
|
||||
git_repository *repo = cl_git_sandbox_init("status");
|
||||
git_index *index;
|
||||
git_index_entry entry = {0};
|
||||
git_index_entry entry = {{0}};
|
||||
git_status_list *statuslist;
|
||||
const git_status_entry *status;
|
||||
git_oid zero_id = {0};
|
||||
git_oid zero_id = {{0}};
|
||||
|
||||
entry.mode = 0100644;
|
||||
entry.path = "modified_file";
|
||||
|
Loading…
Reference in New Issue
Block a user