mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 12:01:40 +00:00
Initialize a few variables
Coverity complains about the git_rawobj ones because we use a loop in which we keep remembering the old version, and we end up copying our object as the base, so we want to have the data pointer be NULL.
This commit is contained in:
parent
81be2f467c
commit
02980bdca1
@ -822,7 +822,7 @@ static int resolve_deltas(git_indexer *idx, git_transfer_progress *stats)
|
||||
progressed = 0;
|
||||
non_null = 0;
|
||||
git_vector_foreach(&idx->deltas, i, delta) {
|
||||
git_rawobj obj;
|
||||
git_rawobj obj = {NULL};
|
||||
|
||||
if (!delta)
|
||||
continue;
|
||||
|
@ -383,7 +383,7 @@ static int pack_backend__read_internal(
|
||||
git_odb_backend *backend, const git_oid *oid)
|
||||
{
|
||||
struct git_pack_entry e;
|
||||
git_rawobj raw;
|
||||
git_rawobj raw = {NULL};
|
||||
int error;
|
||||
|
||||
if ((error = pack_entry_find(&e, (struct pack_backend *)backend, oid)) < 0 ||
|
||||
|
@ -512,7 +512,7 @@ static int rebase_ensure_not_dirty(
|
||||
git_tree *head = NULL;
|
||||
git_index *index = NULL;
|
||||
git_diff *diff = NULL;
|
||||
int error;
|
||||
int error = 0;
|
||||
|
||||
if (check_index) {
|
||||
if ((error = git_repository_head_tree(&head, repo)) < 0 ||
|
||||
|
Loading…
Reference in New Issue
Block a user