Unverified Commit 73427b94 by Patrick Steinhardt Committed by GitHub

Merge pull request #5142 from scottfurry/StaticChkFixExamples

Resolve static check warnings in example code
parents e9102def 2ba7dbbe
...@@ -244,5 +244,5 @@ static void parse_opts(struct opts *o, int argc, char *argv[]) ...@@ -244,5 +244,5 @@ static void parse_opts(struct opts *o, int argc, char *argv[])
} }
if (!o->dir) if (!o->dir)
usage("must specify directory to init", NULL); usage("must specify directory to init", "");
} }
...@@ -220,6 +220,7 @@ static int create_merge_commit(git_repository *repo, git_index *index, merge_opt ...@@ -220,6 +220,7 @@ static int create_merge_commit(git_repository *repo, git_index *index, merge_opt
check_lg2(git_repository_head(&head_ref, repo), "failed to get repo HEAD", NULL); check_lg2(git_repository_head(&head_ref, repo), "failed to get repo HEAD", NULL);
if (resolve_refish(&merge_commit, repo, opts->heads[0])) { if (resolve_refish(&merge_commit, repo, opts->heads[0])) {
fprintf(stderr, "failed to resolve refish %s", opts->heads[0]); fprintf(stderr, "failed to resolve refish %s", opts->heads[0]);
free(parents);
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment