git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] reftable: mark unused parameters in empty iterator functions

From
Patrick Steinhardt <ps@pks.im>
Date
Aug 28, 2024, 08:19 UTC
Message-ID
<Zs7diDgkP33jG5W7@tanuki>
In-Reply-To
<20240828040944.GA4005021@coredump.intra.peff.net>
On Wed, Aug 28, 2024 at 12:09:44AM -0400, Jeff King wrote:
Show 40 quoted lines
> These unused parameters were marked in a68ec8683a (reftable: mark unused
> parameters in virtual functions, 2024-08-17), but the functions were
> moved to a new file in a parallel branch via f2406c81b9
> (reftable/generic: move generic iterator code into iterator interface,
> 2024-08-22).
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> This should go on top of ps/reftable-drop-generic. Arguably this could
> have been done as part of the conflict resolution when merging into next
> alongside jk/mark-unused-parameters, but at this point I think a
> separate patch is the best way forward.
> 
>  reftable/iter.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/reftable/iter.c b/reftable/iter.c
> index 97a4642ed5..1d99fe4f7d 100644
> --- a/reftable/iter.c
> +++ b/reftable/iter.c
> @@ -25,17 +25,17 @@ int iterator_next(struct reftable_iterator *it, struct reftable_record *rec)
>  	return it->ops->next(it->iter_arg, rec);
>  }
>  
> -static int empty_iterator_seek(void *arg, struct reftable_record *want)
> +static int empty_iterator_seek(void *arg UNUSED, struct reftable_record *want UNUSED)
>  {
>  	return 0;
>  }
>  
> -static int empty_iterator_next(void *arg, struct reftable_record *rec)
> +static int empty_iterator_next(void *arg UNUSED, struct reftable_record *rec UNUSED)
>  {
>  	return 1;
>  }
>  
> -static void empty_iterator_close(void *arg)
> +static void empty_iterator_close(void *arg UNUSED)
>  {
>  }
These changes look obviously correct to me, thanks!
Patrick
Previous: Jeff KingNext: Junio C Hamano
Message 2 of 4 in “reftable: mark unused parameters in empty iterator functions”
  1. reftable: mark unused parameters in empty iterator functionsJeff King, Aug 28, 2024
  2. Patrick SteinhardtAug 28, 2024
  3. Junio C HamanoAug 28, 2024
  4. Jeff KingAug 28, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.