On Mon, Jun 20, 2022 at 09:09:27PM +0200, Ævar Arnfjörð Bjarmason wrote: > I.e. if we had a "foo(worktrees)" line before the "worktrees = > get_worktrees()" we'd still remove these lines, but we don't want > that. It just needs to do the appropriate cocci for "don't match it if > you see this variable, unless the line matches...". > > Of coures that only helps after your 1/2, so maybe there's not much > value in it for your case, i.e. it won't be reaching across functions. The cases that reach across functions are actually easier to find, because the compiler knows that the function does not even look at its parameter. And so you can remove it, and then remove it from the caller, and so on. Of course, that requires us to squash all of the -Wunused-parameter noise. I've done that, but it's like 100 ugly patches. I haven't had the time to polish it all up, but perhaps I'll at least send the start of the transition soon. -Peff