On Sat, Mar 09, 2019 at 06:30:21PM +0000, Thomas Gummerer wrote: > On 03/07, Jeff King wrote: > > On Mon, Feb 25, 2019 at 11:16:16PM +0000, Thomas Gummerer wrote: > > > > > +static int do_drop_stash(const char *prefix, struct stash_info *info, int quiet) > > > > This series hit next recently, so I started building it merged with my > > -Wunused-parameters series. This "prefix" parameter is not ever used. > > Skimming through the function, I don't see anything that _should_ be > > using it, so I think it's just cruft, and not indicative of a bug. > > Agreed, I think it's only cruft, and shouldn't be used anywhere in the > function. Below is a patch to remove the parameter. Thanks. I did something similar temporarily for my own tree, but I'll assume yours will go on top of the stash topic upstream. The patch below looks good (and matches what I did locally). > > The same is true of create_stash() elsewhere in the series. But there it > > might be worth keeping for consistency with the other top-level action > > functions. The other ones pass "prefix" to parse_options(), but > > create_stash() doesn't actually parse any options (and intentionally so, > > since even "--help" should be taken as part of the stash message). > > Agreed, I'd be happy to keep the parameter there. Looking at your > fork, you seem to have some WIP patches to introduce a UNUSED macro > for parameters like this, which I don't think I've seen on the list > yet (though I may have just missed them). > > I guess it's probably best for you to mark this parameter as UNUSED as > part of your series, but if you have a different preference on how to > handle it, let me know. Yep, that sounds good; I'll eventually mark this UNUSED when I send those patches. The "mark unused" ones haven't hit the list yet. I've been trickling the patches out, 10 or so at a time, but I'm still on the "drop ones that we can" patches, and haven't even gotten to the "mark ones we want to keep" patches. :) -Peff