Commit 185fe9c1 by Edward Thomson Committed by GitHub

Merge pull request #4051 from tiennou/clang-analyzer-1

Clang analyzer run
parents 048c5ea7 49be45a1
......@@ -278,7 +278,7 @@ int git_ignore__for_path(
int error = 0;
const char *workdir = git_repository_workdir(repo);
assert(ignores && path);
assert(repo && ignores && path);
memset(ignores, 0, sizeof(*ignores));
ignores->repo = repo;
......@@ -503,9 +503,9 @@ int git_ignore_path_is_ignored(
unsigned int i;
git_attr_file *file;
assert(ignored && pathname);
assert(repo && ignored && pathname);
workdir = repo ? git_repository_workdir(repo) : NULL;
workdir = git_repository_workdir(repo);
memset(&path, 0, sizeof(path));
memset(&ignores, 0, sizeof(ignores));
......
......@@ -1738,7 +1738,7 @@ int git_packbuilder_insert_walk(git_packbuilder *pb, git_revwalk *walk)
if (error == GIT_ITEROVER)
error = 0;
return 0;
return error;
}
int git_packbuilder_set_callbacks(git_packbuilder *pb, git_packbuilder_progress progress_cb, void *progress_cb_payload)
......
......@@ -451,9 +451,11 @@ int git_diff_foreach(
if (binary_cb || hunk_cb || data_cb) {
if ((error = patch_generated_init(&patch, diff, idx)) != 0 ||
(error = patch_generated_load(&patch, &xo.output)) != 0)
(error = patch_generated_load(&patch, &xo.output)) != 0) {
git_patch_free(&patch.base);
return error;
}
}
if ((error = patch_generated_invoke_file_callback(&patch, &xo.output)) == 0) {
if (binary_cb || hunk_cb || data_cb)
......
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