Commit 02980bdc by Carlos Martín Nieto

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.
parent 81be2f46
......@@ -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 ||
......
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