Merge branch 'jk/unused-anno-more'

More UNUSED annotation to help using -Wunused option with the
compiler.

* jk/unused-anno-more:
  ll-merge: mark unused parameters in callbacks
  diffcore-pickaxe: mark unused parameters in pickaxe functions
  convert: mark unused parameter in null stream filter
  apply: mark unused parameters in noop error/warning routine
  apply: mark unused parameters in handlers
  date: mark unused parameters in handler functions
  string-list: mark unused callback parameters
  object-file: mark unused parameters in hash_unknown functions
  mark unused parameters in trivial compat functions
  update-index: drop unused argc from do_reupdate()
  submodule--helper: drop unused argc from module_list_compute()
  diffstat_consume(): assert non-zero length
This commit is contained in:
Junio C Hamano
2022-10-27 14:51:52 -07:00
19 changed files with 70 additions and 57 deletions

View File

@ -140,27 +140,32 @@ static void git_hash_sha256_final_oid(struct object_id *oid, git_hash_ctx *ctx)
oid->algo = GIT_HASH_SHA256;
}
static void git_hash_unknown_init(git_hash_ctx *ctx)
static void git_hash_unknown_init(git_hash_ctx *ctx UNUSED)
{
BUG("trying to init unknown hash");
}
static void git_hash_unknown_clone(git_hash_ctx *dst, const git_hash_ctx *src)
static void git_hash_unknown_clone(git_hash_ctx *dst UNUSED,
const git_hash_ctx *src UNUSED)
{
BUG("trying to clone unknown hash");
}
static void git_hash_unknown_update(git_hash_ctx *ctx, const void *data, size_t len)
static void git_hash_unknown_update(git_hash_ctx *ctx UNUSED,
const void *data UNUSED,
size_t len UNUSED)
{
BUG("trying to update unknown hash");
}
static void git_hash_unknown_final(unsigned char *hash, git_hash_ctx *ctx)
static void git_hash_unknown_final(unsigned char *hash UNUSED,
git_hash_ctx *ctx UNUSED)
{
BUG("trying to finalize unknown hash");
}
static void git_hash_unknown_final_oid(struct object_id *oid, git_hash_ctx *ctx)
static void git_hash_unknown_final_oid(struct object_id *oid UNUSED,
git_hash_ctx *ctx UNUSED)
{
BUG("trying to finalize unknown hash");
}