Re: [PATCH] fetch-pack: Remove unused struct 'loose_object_iter'

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


On Sun, May 12, 2024 at 01:59:13AM +0100, Dr. David Alan Gilbert wrote:

> 'loose_object_iter' in fetch-pack.c is unused since
> commit 97b2fa08b6b9ee3e ("fetch-pack: drop custom loose object cache")
> Remove it.

Thanks, this was my fault for leaving it in. The patch looks obviously

I wish there was a good way to get the compiler to report on unused
types, but I don't think there is (it's a complicated problem in
general, but file-local ones like this feel like they should be easy to

Here's a really hacky (and quadratic) attempt to find defined structs
that aren't mentioned elsewhere:

  for i in $(git grep -ho '^struct [a-z_]* {' | cut -d' ' -f2)
	used=$(git grep -Phc "\b$i\b" |
	       perl -ne '$x += $_; END { print $x }')
	echo "$used $i"
  done |
  sort -n

which finds exactly one unused struct, the one in this patch.


[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