mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 18:38:58 +00:00
Merge pull request #4051 from tiennou/clang-analyzer-1
Clang analyzer run
This commit is contained in:
commit
185fe9c1c1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user