Re: [PATCH] multi-pack-index: avoid dead store for struct progress

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/2018 2:59 PM, Carlo Marcelo Arenas Belón wrote:
it is initialized unconditionally by a call to start_progress
below.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx>
---
  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;
This makes sense as a cleanup. Is there a tool that reports a wasted initialization that you used to find this?

-Stolee



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux