From 07f967adb55fd2285f9c916b32731968e557acc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Thu, 18 Oct 2018 11:46:04 -0700 Subject: unpack-trees: avoid dead store for struct progress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it is unconditionally initialized a few lines below Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- unpack-trees.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unpack-trees.c b/unpack-trees.c index 51bfac6aa0..7570df481b 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -380,7 +380,7 @@ static int check_updates(struct unpack_trees_options *o) { unsigned cnt = 0; int errs = 0; - struct progress *progress = NULL; + struct progress *progress; struct index_state *index = &o->result; struct checkout state = CHECKOUT_INIT; int i; -- cgit v1.2.3 From 17eeb067dade419246c73a97cb86535723cee473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Thu, 18 Oct 2018 11:59:20 -0700 Subject: multi-pack-index: avoid dead store for struct progress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it is initialized unconditionally by a call to start_progress below. Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- midx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/midx.c b/midx.c index ea2f3ffe2e..4fac0cd08a 100644 --- a/midx.c +++ b/midx.c @@ -941,7 +941,7 @@ static void midx_report(const char *fmt, ...) int verify_midx_file(const char *object_dir) { uint32_t i; - struct progress *progress = NULL; + struct progress *progress; struct multi_pack_index *m = load_multi_pack_index(object_dir, 1); verify_midx_error = 0; -- cgit v1.2.3