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

Re: [PATCH v1] load_cache_entries_threaded: remove unused src_offset parameter

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 22, 2018, 23:05 UTC
Message-ID
<xmqqo9bltwdy.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20181022201721.GD9917@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> If nobody uses it, should we drop the return value, too? Like:
Yup.
Show 35 quoted lines
>
> diff --git a/read-cache.c b/read-cache.c
> index 78c9516eb7..4b44a2eae5 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -2052,12 +2052,11 @@ static void *load_cache_entries_thread(void *_data)
>  	return NULL;
>  }
>  
> -static unsigned long load_cache_entries_threaded(struct index_state *istate, const char *mmap, size_t mmap_size,
> -						 int nr_threads, struct index_entry_offset_table *ieot)
> +static void load_cache_entries_threaded(struct index_state *istate, const char *mmap, size_t mmap_size,
> +					int nr_threads, struct index_entry_offset_table *ieot)
>  {
>  	int i, offset, ieot_blocks, ieot_start, err;
>  	struct load_cache_entries_thread_data *data;
> -	unsigned long consumed = 0;
>  
>  	/* a little sanity checking */
>  	if (istate->name_hash_initialized)
> @@ -2115,12 +2114,9 @@ static unsigned long load_cache_entries_threaded(struct index_state *istate, con
>  		if (err)
>  			die(_("unable to join load_cache_entries thread: %s"), strerror(err));
>  		mem_pool_combine(istate->ce_mem_pool, p->ce_mem_pool);
> -		consumed += p->consumed;
>  	}
>  
>  	free(data);
> -
> -	return consumed;
>  }
>  #endif
>  
>
> -Peff
Previous: Jeff KingNext: Ben Peart
Message 3 of 5 in “load_cache_entries_threaded: remove unused src_offset parameter”
  1. load_cache_entries_threaded: remove unused src_offset parameterBen Peart, Oct 22, 2018
  2. Jeff KingOct 22, 2018
  3. Junio C HamanoOct 22, 2018
  4. Ben PeartOct 23, 2018
  5. Jeff KingOct 23, 2018

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.