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

[PATCH] multi-pack-index: make code -Wunused-parameter clean

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Nov 4, 2018, 00:49 UTC
Message-ID
<20181104004957.52913-1-carenas@gmail.com>

introduced in 662148c435 ("midx: write object offsets", 2018-07-12) but included on all previous versions as well.

midx.c:713:54: warning: unused parameter 'nr_objects' [-Wunused-parameter]

likely an oversight as the information needed to iterate over is embedded in nr_large_offset

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 midx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/midx.c b/midx.c
index 4fac0cd08a..a2c17e3108 100644
--- a/midx.c
+++ b/midx.c
@@ -710,7 +710,7 @@ static size_t write_midx_object_offsets(struct hashfile *f, int large_offset_nee
 }
 
 static size_t write_midx_large_offsets(struct hashfile *f, uint32_t nr_large_offset,
-				       struct pack_midx_entry *objects, uint32_t nr_objects)
+				       struct pack_midx_entry *objects)
 {
 	struct pack_midx_entry *list = objects;
 	size_t written = 0;
@@ -880,7 +880,7 @@ int write_midx_file(const char *object_dir)
 				break;
 
 			case MIDX_CHUNKID_LARGEOFFSETS:
-				written += write_midx_large_offsets(f, num_large_offsets, entries, nr_entries);
+				written += write_midx_large_offsets(f, num_large_offsets, entries);
 				break;
 
 			default:
-- 
2.19.1.816.gcd69ec8cd
Next: Jeff King
Message 1 of 3 in “multi-pack-index: make code -Wunused-parameter clean”
  1. multi-pack-index: make code -Wunused-parameter cleanCarlo Marcelo Arenas Belón, Nov 4, 2018
  2. Jeff KingNov 4, 2018
  3. Derrick StoleeNov 5, 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.