Merge branch 'jk/unused-post-2.39-part2'

More work towards -Wunused.

* jk/unused-post-2.39-part2: (21 commits)
  help: mark unused parameter in git_unknown_cmd_config()
  run_processes_parallel: mark unused callback parameters
  userformat_want_item(): mark unused parameter
  for_each_commit_graft(): mark unused callback parameter
  rewrite_parents(): mark unused callback parameter
  fetch-pack: mark unused parameter in callback function
  notes: mark unused callback parameters
  prio-queue: mark unused parameters in comparison functions
  for_each_object: mark unused callback parameters
  list-objects: mark unused callback parameters
  mark unused parameters in signal handlers
  run-command: mark error routine parameters as unused
  mark "pointless" data pointers in callbacks
  ref-filter: mark unused callback parameters
  http-backend: mark unused parameters in virtual functions
  http-backend: mark argc/argv unused
  object-name: mark unused parameters in disambiguate callbacks
  serve: mark unused parameters in virtual functions
  serve: use repository pointer to get config
  ls-refs: drop config caching
  ...
This commit is contained in:
Junio C Hamano
2023-03-17 14:03:09 -07:00
43 changed files with 211 additions and 176 deletions

12
serve.c
View File

@ -13,13 +13,13 @@
static int advertise_sid = -1;
static int client_hash_algo = GIT_HASH_SHA1;
static int always_advertise(struct repository *r,
struct strbuf *value)
static int always_advertise(struct repository *r UNUSED,
struct strbuf *value UNUSED)
{
return 1;
}
static int agent_advertise(struct repository *r,
static int agent_advertise(struct repository *r UNUSED,
struct strbuf *value)
{
if (value)
@ -35,7 +35,7 @@ static int object_format_advertise(struct repository *r,
return 1;
}
static void object_format_receive(struct repository *r,
static void object_format_receive(struct repository *r UNUSED,
const char *algo_name)
{
if (!algo_name)
@ -49,7 +49,7 @@ static void object_format_receive(struct repository *r,
static int session_id_advertise(struct repository *r, struct strbuf *value)
{
if (advertise_sid == -1 &&
git_config_get_bool("transfer.advertisesid", &advertise_sid))
repo_config_get_bool(r, "transfer.advertisesid", &advertise_sid))
advertise_sid = 0;
if (!advertise_sid)
return 0;
@ -58,7 +58,7 @@ static int session_id_advertise(struct repository *r, struct strbuf *value)
return 1;
}
static void session_id_receive(struct repository *r,
static void session_id_receive(struct repository *r UNUSED,
const char *client_sid)
{
if (!client_sid)