diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-03-31 19:27:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-03-31 19:27:54 -0700 |
commit | a32a0c29dfa7064d010a9d3b7a8970e6dd400999 (patch) | |
tree | 6cfe01e4f04d114c48a750891f28c5984b4f806a | |
parent | 631bc94e67383b66da190550866566f09d32f299 (diff) | |
parent | 803a777942b0b1c91890c2f97d4f10972cf2881e (diff) | |
download | git-a32a0c29dfa7064d010a9d3b7a8970e6dd400999.tar.gz |
Merge branch 'maint'
* maint:
cat-file: Fix an gcc -Wuninitialized warning
fast-import: Fix an gcc -Wuninitialized warning
-rw-r--r-- | builtin/cat-file.c | 2 | ||||
-rw-r--r-- | fast-import.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c index ad29000736..40f87b4649 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -193,7 +193,7 @@ static int batch_one_object(const char *obj_name, int print_contents) unsigned char sha1[20]; enum object_type type = 0; unsigned long size; - void *contents; + void *contents = NULL; if (!obj_name) return 1; diff --git a/fast-import.c b/fast-import.c index a0c2c2ff14..5f539d7d8f 100644 --- a/fast-import.c +++ b/fast-import.c @@ -2465,6 +2465,7 @@ static void note_change_n(struct branch *b, unsigned char *old_fanout) hashcpy(sha1, oe->idx.sha1); } else if (!prefixcmp(p, "inline ")) { inline_data = 1; + oe = NULL; /* not used with inline_data, but makes gcc happy */ p += strlen("inline"); /* advance to space */ } else { if (get_sha1_hex(p, sha1)) |