{"thread":{"id":"58944","subject":"[PATCH 0/9] more -Wunused-parameter fixes/annotations","startedAt":"2022-12-13T11:11:46Z","lastAt":"2022-12-14T01:38:21Z","messageCount":11,"participants":["Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"468979","messageId":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","threadId":"58944","inReplyTo":null,"subject":"[PATCH 0/9] more -Wunused-parameter fixes/annotations","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:10:54Z","receivedAt":"2022-12-13T11:11:46Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"This was supposed to just be annotations, but after staring at a few of\nthe cases, I think we're better off removing the unused parameters. I've\nfloated those ones up to the top of the series.\n\n  [1/9]: ls-refs: use repository parameter to iterate refs\n  [2/9]: blob: drop unused parts of parse_blob_buffer()\n  [3/9]: list-objects: drop process_gitlink() function\n  [4/9]: ws: drop unused parameter from ws_blank_line()\n  [5/9]: xdiff: drop unused parameter in def_ff()\n  [6/9]: xdiff: mark unused parameter in xdl_call_hunk_func()\n  [7/9]: diff: mark unused parameters in callbacks\n  [8/9]: list-objects-filter: mark unused parameters in virtual functions\n  [9/9]: userdiff: mark unused parameter in internal callback\n\n add-interactive.c           |  2 +-\n apply.c                     |  4 ++--\n blob.c                      |  3 +--\n blob.h                      |  3 +--\n builtin/add.c               |  2 +-\n builtin/fast-export.c       |  2 +-\n builtin/merge-tree.c        |  2 +-\n builtin/merge.c             |  2 +-\n builtin/rerere.c            |  2 +-\n builtin/reset.c             |  3 ++-\n builtin/submodule--helper.c |  2 +-\n cache.h                     |  2 +-\n combine-diff.c              |  2 +-\n diff-lib.c                  |  2 +-\n diff.c                      | 18 +++++++++---------\n list-objects-filter.c       | 30 +++++++++++++++---------------\n list-objects.c              | 33 +--------------------------------\n ls-refs.c                   |  5 +++--\n object.c                    |  5 ++---\n range-diff.c                | 12 ++++++++----\n ref-filter.c                |  5 +++--\n refs.c                      |  9 +++++----\n refs.h                      |  6 ++++--\n revision.c                  | 25 +++++++++++++++----------\n submodule.c                 |  2 +-\n userdiff.c                  |  3 ++-\n ws.c                        |  2 +-\n wt-status.c                 |  4 ++--\n xdiff/xdiffi.c              |  2 +-\n xdiff/xemit.c               |  4 ++--\n 30 files changed, 90 insertions(+), 108 deletions(-)\n\n-Peff\n"},{"id":"468980","messageId":"Y5hdzjlboJrsnvKK@coredump.intra.peff.net","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"[PATCH 1/9] ls-refs: use repository parameter to iterate refs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:11:10Z","receivedAt":"2022-12-13T11:12:24Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The ls_refs() function (for the v2 protocol command of the same name)\ntakes a repository parameter (like all v2 commands), but ignores it. It\nshould use it to access the refs.\n\nThis isn't a bug in practice, since we only call this function when\nserving upload-pack from the main repository. But it's an awkward\ngotcha, and it causes -Wunused-parameter to complain.\n\nThe main reason we don't use the repository parameter is that the ref\niteration interface we call doesn't have a \"refs_\" variant that takes a\nref_store. However we can easily add one. In fact, since there is only\none other caller (in ref-filter.c), there is no need to maintain the\nnon-repository wrapper; that caller can just use the_repository. It's\nstill a long way from consistently using a repository object, but it's\none small step in the right direction.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n ls-refs.c    | 5 +++--\n ref-filter.c | 5 +++--\n refs.c       | 9 +++++----\n refs.h       | 6 ++++--\n 4 files changed, 15 insertions(+), 10 deletions(-)\n\ndiff --git a/ls-refs.c b/ls-refs.c\nindex fb6769742c..697d4beb8d 100644\n--- a/ls-refs.c\n+++ b/ls-refs.c\n@@ -194,8 +194,9 @@ int ls_refs(struct repository *r, struct packet_reader *request)\n \tsend_possibly_unborn_head(&data);\n \tif (!data.prefixes.nr)\n \t\tstrvec_push(&data.prefixes, \"\");\n-\tfor_each_fullref_in_prefixes(get_git_namespace(), data.prefixes.v,\n-\t\t\t\t     send_ref, &data);\n+\trefs_for_each_fullref_in_prefixes(get_main_ref_store(r),\n+\t\t\t\t\t  get_git_namespace(), data.prefixes.v,\n+\t\t\t\t\t  send_ref, &data);\n \tpacket_fflush(stdout);\n \tstrvec_clear(&data.prefixes);\n \tstrbuf_release(&data.buf);\ndiff --git a/ref-filter.c b/ref-filter.c\nindex 9dc2cd1451..971303683b 100644\n--- a/ref-filter.c\n+++ b/ref-filter.c\n@@ -2128,8 +2128,9 @@ static int for_each_fullref_in_pattern(struct ref_filter *filter,\n \t\treturn for_each_fullref_in(\"\", cb, cb_data);\n \t}\n \n-\treturn for_each_fullref_in_prefixes(NULL, filter->name_patterns,\n-\t\t\t\t\t    cb, cb_data);\n+\treturn refs_for_each_fullref_in_prefixes(get_main_ref_store(the_repository),\n+\t\t\t\t\t\t NULL, filter->name_patterns,\n+\t\t\t\t\t\t cb, cb_data);\n }\n \n /*\ndiff --git a/refs.c b/refs.c\nindex 2c7e88b190..e31dbcda59 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -1723,9 +1723,10 @@ static void find_longest_prefixes(struct string_list *out,\n \tstrbuf_release(&prefix);\n }\n \n-int for_each_fullref_in_prefixes(const char *namespace,\n-\t\t\t\t const char **patterns,\n-\t\t\t\t each_ref_fn fn, void *cb_data)\n+int refs_for_each_fullref_in_prefixes(struct ref_store *ref_store,\n+\t\t\t\t      const char *namespace,\n+\t\t\t\t      const char **patterns,\n+\t\t\t\t      each_ref_fn fn, void *cb_data)\n {\n \tstruct string_list prefixes = STRING_LIST_INIT_DUP;\n \tstruct string_list_item *prefix;\n@@ -1740,7 +1741,7 @@ int for_each_fullref_in_prefixes(const char *namespace,\n \n \tfor_each_string_list_item(prefix, &prefixes) {\n \t\tstrbuf_addstr(&buf, prefix->string);\n-\t\tret = for_each_fullref_in(buf.buf, fn, cb_data);\n+\t\tret = refs_for_each_fullref_in(ref_store, buf.buf, fn, cb_data);\n \t\tif (ret)\n \t\t\tbreak;\n \t\tstrbuf_setlen(&buf, namespace_len);\ndiff --git a/refs.h b/refs.h\nindex 3266fd8f57..935cdd1ece 100644\n--- a/refs.h\n+++ b/refs.h\n@@ -354,8 +354,10 @@ int for_each_fullref_in(const char *prefix, each_ref_fn fn, void *cb_data);\n  *\n  * callers should be prepared to ignore references that they did not ask for.\n  */\n-int for_each_fullref_in_prefixes(const char *namespace, const char **patterns,\n-\t\t\t\t each_ref_fn fn, void *cb_data);\n+int refs_for_each_fullref_in_prefixes(struct ref_store *refs,\n+\t\t\t\t      const char *namespace, const char **patterns,\n+\t\t\t\t      each_ref_fn fn, void *cb_data);\n+\n /**\n  * iterate refs from the respective area.\n  */\n-- \n2.39.0.546.g5ea984bc66\n\n"},{"id":"468981","messageId":"Y5hd/bOiM76stTNt@coredump.intra.peff.net","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"[PATCH 2/9] blob: drop unused parts of parse_blob_buffer()","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:11:57Z","receivedAt":"2022-12-13T11:13:25Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Our parse_blob_buffer() takes a ptr/len combo, just like\nparse_tree_buffer(), etc, and returns success or failure. But it doesn't\nactually do anything with them; we just set the \"parsed\" flag in the\nobject and return success, without even looking at the contents.\n\nThere could be some value to keeping these unused parameters:\n\n  - it's consistent with the parse functions for other object types. But\n    we already lost that consistency in 837d395a5c (Replace parse_blob()\n    with an explanatory comment, 2010-01-18).\n\n  - As the comment from 837d395a5c explains, callers are supposed to\n    make sure they have the object content available. So in theory\n    asking for these parameters could serve as a signal. But there are\n    only two callers, and one of them always passes NULL (after doing a\n    streaming check of the object hash).\n\n    This shows that there aren't likely to be a lot of callers (since\n    everyone either uses the type-generic parse functions, or handles\n    blobs individually), and that they need to take special care anyway\n    (because we usually want to avoid loading whole blobs in memory if\n    we can avoid it).\n\nSo let's just drop these unused parameters, and likewise the useless\nreturn value. While we're touching the header file, let's move the\ndeclaration of parse_blob_buffer() right below that explanatory comment,\nwhere it's more likely to be seen by people looking for the function.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n blob.c   | 3 +--\n blob.h   | 3 +--\n object.c | 5 ++---\n 3 files changed, 4 insertions(+), 7 deletions(-)\n\ndiff --git a/blob.c b/blob.c\nindex 182718aba9..8f83523b0c 100644\n--- a/blob.c\n+++ b/blob.c\n@@ -13,8 +13,7 @@ struct blob *lookup_blob(struct repository *r, const struct object_id *oid)\n \treturn object_as_type(obj, OBJ_BLOB, 0);\n }\n \n-int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)\n+void parse_blob_buffer(struct blob *item)\n {\n \titem->object.parsed = 1;\n-\treturn 0;\n }\ndiff --git a/blob.h b/blob.h\nindex 1664872055..74555c90c4 100644\n--- a/blob.h\n+++ b/blob.h\n@@ -11,15 +11,14 @@ struct blob {\n \n struct blob *lookup_blob(struct repository *r, const struct object_id *oid);\n \n-int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size);\n-\n /**\n  * Blobs do not contain references to other objects and do not have\n  * structured data that needs parsing. However, code may use the\n  * \"parsed\" bit in the struct object for a blob to determine whether\n  * its content has been found to actually be available, so\n  * parse_blob_buffer() is used (by object.c) to flag that the object\n  * has been read successfully from the database.\n  **/\n+void parse_blob_buffer(struct blob *item);\n \n #endif /* BLOB_H */\ndiff --git a/object.c b/object.c\nindex 682b852a46..344087de4d 100644\n--- a/object.c\n+++ b/object.c\n@@ -212,8 +212,7 @@ struct object *parse_object_buffer(struct repository *r, const struct object_id\n \tif (type == OBJ_BLOB) {\n \t\tstruct blob *blob = lookup_blob(r, oid);\n \t\tif (blob) {\n-\t\t\tif (parse_blob_buffer(blob, buffer, size))\n-\t\t\t\treturn NULL;\n+\t\t\tparse_blob_buffer(blob);\n \t\t\tobj = &blob->object;\n \t\t}\n \t} else if (type == OBJ_TREE) {\n@@ -292,7 +291,7 @@ struct object *parse_object_with_flags(struct repository *r,\n \t\t\terror(_(\"hash mismatch %s\"), oid_to_hex(oid));\n \t\t\treturn NULL;\n \t\t}\n-\t\tparse_blob_buffer(lookup_blob(r, oid), NULL, 0);\n+\t\tparse_blob_buffer(lookup_blob(r, oid));\n \t\treturn lookup_object(r, oid);\n \t}\n \n-- \n2.39.0.546.g5ea984bc66\n\n"},{"id":"468982","messageId":"Y5heCZ7uak1kymiV@coredump.intra.peff.net","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"[PATCH 3/9] list-objects: drop process_gitlink() function","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:12:09Z","receivedAt":"2022-12-13T11:13:58Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Our object graph traversal code has a process_gitlink() function which\nwe call when we see a gitlink entry. The function does nothing; it was\nadded in the early days of gitlinks by 6e2f441bd4 (Teach git\nlist-objects logic to not follow gitlinks, 2007-04-13).\n\nThe comment above the function talks about some things we _could_ do.\nBut in the intervening 15 years, nobody has touched the function, and\nthe submodule code usually makes its own decisions about when and how to\nexamine the links. At the generic traversal layer, we can't assume that\nthe pointed-to commit is available.\n\nLet's drop this placeholder that isn't really helping anything. This\nsilences some -Wunused-parameter warnings, and also gets rid of a crufty\nuse of \"const unsigned char *\" to pass a raw hash value.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n list-objects.c | 33 +--------------------------------\n 1 file changed, 1 insertion(+), 32 deletions(-)\n\ndiff --git a/list-objects.c b/list-objects.c\nindex 250d9de41c..7528fe1db2 100644\n--- a/list-objects.c\n+++ b/list-objects.c\n@@ -81,36 +81,6 @@ static void process_blob(struct traversal_context *ctx,\n \tstrbuf_setlen(path, pathlen);\n }\n \n-/*\n- * Processing a gitlink entry currently does nothing, since\n- * we do not recurse into the subproject.\n- *\n- * We *could* eventually add a flag that actually does that,\n- * which would involve:\n- *  - is the subproject actually checked out?\n- *  - if so, see if the subproject has already been added\n- *    to the alternates list, and add it if not.\n- *  - process the commit (or tag) the gitlink points to\n- *    recursively.\n- *\n- * However, it's unclear whether there is really ever any\n- * reason to see superprojects and subprojects as such a\n- * \"unified\" object pool (potentially resulting in a totally\n- * humongous pack - avoiding which was the whole point of\n- * having gitlinks in the first place!).\n- *\n- * So for now, there is just a note that we *could* follow\n- * the link, and how to do it. Whether it necessarily makes\n- * any sense what-so-ever to ever do that is another issue.\n- */\n-static void process_gitlink(struct traversal_context *ctx,\n-\t\t\t    const unsigned char *sha1,\n-\t\t\t    struct strbuf *path,\n-\t\t\t    const char *name)\n-{\n-\t/* Nothing to do */\n-}\n-\n static void process_tree(struct traversal_context *ctx,\n \t\t\t struct tree *tree,\n \t\t\t struct strbuf *base,\n@@ -149,8 +119,7 @@ static void process_tree_contents(struct traversal_context *ctx,\n \t\t\tprocess_tree(ctx, t, base, entry.path);\n \t\t}\n \t\telse if (S_ISGITLINK(entry.mode))\n-\t\t\tprocess_gitlink(ctx, entry.oid.hash,\n-\t\t\t\t\tbase, entry.path);\n+\t\t\t; /* ignore gitlink */\n \t\telse {\n \t\t\tstruct blob *b = lookup_blob(ctx->revs->repo, &entry.oid);\n \t\t\tif (!b) {\n-- \n2.39.0.546.g5ea984bc66\n\n"},{"id":"468983","messageId":"Y5heOlU9jlTVb8BE@coredump.intra.peff.net","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"[PATCH 4/9] ws: drop unused parameter from ws_blank_line()","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:12:58Z","receivedAt":"2022-12-13T11:14:54Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"We take a ws_rule parameter, but have never looked at it since the\nfunction was added in 877f23ccb8 (Teach \"diff --check\" about new blank\nlines at end, 2008-06-26). A comment in the function does mention how we\n_could_ use it, but nobody has felt the need to do so for over a decade.\n\nWe could keep it around as reminder of what could be done, but the\ncomment serves that purpose. And in the meantime, it triggers\n-Wunused-parameter.\n\nSo let's drop it, which in turn allows us to drop similar arguments\nfurther up the callstack. I've left the comment intact. It does still\nsay \"ws_rule\", but that name is used consistently in the whitespace\ncode, so the meaning is clear.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n apply.c |  4 ++--\n cache.h |  2 +-\n diff.c  | 11 +++++------\n ws.c    |  2 +-\n 4 files changed, 9 insertions(+), 10 deletions(-)\n\ndiff --git a/apply.c b/apply.c\nindex bc33814313..8582228047 100644\n--- a/apply.c\n+++ b/apply.c\n@@ -2911,11 +2911,11 @@ static int apply_one_fragment(struct apply_state *state,\n \t\t\tadd_line_info(&postimage, \"\\n\", 1, LINE_COMMON);\n \t\t\tis_blank_context = 1;\n \t\t\tbreak;\n \t\tcase ' ':\n \t\t\tif (plen && (ws_rule & WS_BLANK_AT_EOF) &&\n-\t\t\t    ws_blank_line(patch + 1, plen, ws_rule))\n+\t\t\t    ws_blank_line(patch + 1, plen))\n \t\t\t\tis_blank_context = 1;\n \t\t\t/* fallthrough */\n \t\tcase '-':\n \t\t\tmemcpy(old, patch + 1, plen);\n \t\t\tadd_line_info(&preimage, old, plen,\n@@ -2940,11 +2940,11 @@ static int apply_one_fragment(struct apply_state *state,\n \t\t\t}\n \t\t\tadd_line_info(&postimage, newlines.buf + start, newlines.len - start,\n \t\t\t\t      (first == '+' ? 0 : LINE_COMMON));\n \t\t\tif (first == '+' &&\n \t\t\t    (ws_rule & WS_BLANK_AT_EOF) &&\n-\t\t\t    ws_blank_line(patch + 1, plen, ws_rule))\n+\t\t\t    ws_blank_line(patch + 1, plen))\n \t\t\t\tadded_blank_line = 1;\n \t\t\tbreak;\n \t\tcase '@': case '\\\\':\n \t\t\t/* Ignore it, we already handled it */\n \t\t\tbreak;\ndiff --git a/cache.h b/cache.h\nindex 07d40b0964..fcf49706ad 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -1863,11 +1863,11 @@ unsigned whitespace_rule(struct index_state *, const char *);\n unsigned parse_whitespace_rule(const char *);\n unsigned ws_check(const char *line, int len, unsigned ws_rule);\n void ws_check_emit(const char *line, int len, unsigned ws_rule, FILE *stream, const char *set, const char *reset, const char *ws);\n char *whitespace_error_string(unsigned ws);\n void ws_fix_copy(struct strbuf *, const char *, int, unsigned, int *);\n-int ws_blank_line(const char *line, int len, unsigned ws_rule);\n+int ws_blank_line(const char *line, int len);\n #define ws_tab_width(rule)     ((rule) & WS_TAB_WIDTH_MASK)\n \n /* ls-files */\n void overlay_tree_on_index(struct index_state *istate,\n \t\t\t   const char *tree_name, const char *prefix);\ndiff --git a/diff.c b/diff.c\nindex 1054a4b732..74ebe247b4 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -602,11 +602,11 @@ static unsigned long diff_filespec_size(struct repository *r,\n \t\treturn 0;\n \tdiff_populate_filespec(r, one, &dpf_options);\n \treturn one->size;\n }\n \n-static int count_trailing_blank(mmfile_t *mf, unsigned ws_rule)\n+static int count_trailing_blank(mmfile_t *mf)\n {\n \tchar *ptr = mf->ptr;\n \tlong size = mf->size;\n \tint cnt = 0;\n \n@@ -620,25 +620,24 @@ static int count_trailing_blank(mmfile_t *mf, unsigned ws_rule)\n \twhile (mf->ptr < ptr) {\n \t\tchar *prev_eol;\n \t\tfor (prev_eol = ptr; mf->ptr <= prev_eol; prev_eol--)\n \t\t\tif (*prev_eol == '\\n')\n \t\t\t\tbreak;\n-\t\tif (!ws_blank_line(prev_eol + 1, ptr - prev_eol, ws_rule))\n+\t\tif (!ws_blank_line(prev_eol + 1, ptr - prev_eol))\n \t\t\tbreak;\n \t\tcnt++;\n \t\tptr = prev_eol - 1;\n \t}\n \treturn cnt;\n }\n \n static void check_blank_at_eof(mmfile_t *mf1, mmfile_t *mf2,\n \t\t\t       struct emit_callback *ecbdata)\n {\n \tint l1, l2, at;\n-\tunsigned ws_rule = ecbdata->ws_rule;\n-\tl1 = count_trailing_blank(mf1, ws_rule);\n-\tl2 = count_trailing_blank(mf2, ws_rule);\n+\tl1 = count_trailing_blank(mf1);\n+\tl2 = count_trailing_blank(mf2);\n \tif (l2 <= l1) {\n \t\tecbdata->blank_at_eof_in_preimage = 0;\n \t\tecbdata->blank_at_eof_in_postimage = 0;\n \t\treturn;\n \t}\n@@ -1581,11 +1580,11 @@ static int new_blank_line_at_eof(struct emit_callback *ecbdata, const char *line\n \t      ecbdata->blank_at_eof_in_preimage &&\n \t      ecbdata->blank_at_eof_in_postimage &&\n \t      ecbdata->blank_at_eof_in_preimage <= ecbdata->lno_in_preimage &&\n \t      ecbdata->blank_at_eof_in_postimage <= ecbdata->lno_in_postimage))\n \t\treturn 0;\n-\treturn ws_blank_line(line, len, ecbdata->ws_rule);\n+\treturn ws_blank_line(line, len);\n }\n \n static void emit_add_line(struct emit_callback *ecbdata,\n \t\t\t  const char *line, int len)\n {\ndiff --git a/ws.c b/ws.c\nindex 6e69877f25..46a77bcad6 100644\n--- a/ws.c\n+++ b/ws.c\n@@ -250,11 +250,11 @@ void ws_check_emit(const char *line, int len, unsigned ws_rule,\n unsigned ws_check(const char *line, int len, unsigned ws_rule)\n {\n \treturn ws_check_emit_1(line, len, ws_rule, NULL, NULL, NULL, NULL);\n }\n \n-int ws_blank_line(const char *line, int len, unsigned ws_rule)\n+int ws_blank_line(const char *line, int len)\n {\n \t/*\n \t * We _might_ want to treat CR differently from other\n \t * whitespace characters when ws_rule has WS_CR_AT_EOL, but\n \t * for now we just use this stupid definition.\n-- \n2.39.0.546.g5ea984bc66\n\n"},{"id":"468984","messageId":"Y5heRPpGYD1v5Z7X@coredump.intra.peff.net","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"[PATCH 5/9] xdiff: drop unused parameter in def_ff()","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:13:08Z","receivedAt":"2022-12-13T11:15:12Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The def_ff() function is the default \"find_func\" for finding hunk\nheaders. It has never used its \"priv\" argument since it was introduced\nin f258475a6e (Per-path attribute based hunk header selection.,\n2007-07-06). But back then we used a function pointer to switch between\na caller-provided function and the default, so the two had to conform to\nthe same interface.\n\nIn ff2981f724 (xdiff: factor out match_func_rec(), 2016-05-28), that\npointer indirection went away in favor of code which directly calls\neither of the two functions. So there's no need for def_ff() to retain\nthis unused parameter.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n xdiff/xemit.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/xdiff/xemit.c b/xdiff/xemit.c\nindex c4ccd68d47..75f0fe4986 100644\n--- a/xdiff/xemit.c\n+++ b/xdiff/xemit.c\n@@ -95,7 +95,7 @@ xdchange_t *xdl_get_hunk(xdchange_t **xscr, xdemitconf_t const *xecfg)\n }\n \n \n-static long def_ff(const char *rec, long len, char *buf, long sz, void *priv)\n+static long def_ff(const char *rec, long len, char *buf, long sz)\n {\n \tif (len > 0 &&\n \t\t\t(isalpha((unsigned char)*rec) || /* identifier? */\n@@ -117,7 +117,7 @@ static long match_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri,\n \tconst char *rec;\n \tlong len = xdl_get_rec(xdf, ri, &rec);\n \tif (!xecfg->find_func)\n-\t\treturn def_ff(rec, len, buf, sz, xecfg->find_func_priv);\n+\t\treturn def_ff(rec, len, buf, sz);\n \treturn xecfg->find_func(rec, len, buf, sz, xecfg->find_func_priv);\n }\n \n-- \n2.39.0.546.g5ea984bc66\n\n"},{"id":"468985","messageId":"Y5heVMGLAQpWq39E@coredump.intra.peff.net","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"[PATCH 6/9] xdiff: mark unused parameter in xdl_call_hunk_func()","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:13:24Z","receivedAt":"2022-12-13T11:15:23Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"This function is used interchangeably with xdl_emit via a function\npointer, so we can't just drop the unused parameter. Mark it to silence\n-Wunused-parameter.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n xdiff/xdiffi.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c\nindex 32652ded2d..344c2dfc3e 100644\n--- a/xdiff/xdiffi.c\n+++ b/xdiff/xdiffi.c\n@@ -973,7 +973,7 @@ void xdl_free_script(xdchange_t *xscr) {\n \t}\n }\n \n-static int xdl_call_hunk_func(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,\n+static int xdl_call_hunk_func(xdfenv_t *xe UNUSED, xdchange_t *xscr, xdemitcb_t *ecb,\n \t\t\t      xdemitconf_t const *xecfg)\n {\n \txdchange_t *xch, *xche;\n-- \n2.39.0.546.g5ea984bc66\n\n"},{"id":"468986","messageId":"Y5hebAsGdsRBgwhD@coredump.intra.peff.net","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"[PATCH 7/9] diff: mark unused parameters in callbacks","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:13:48Z","receivedAt":"2022-12-13T11:15:54Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The diff code provides a format_callback interface, but not every\ncallback needs each parameter (e.g., the \"opt\" and \"data\" parameters are\nfrequently left unused). Likewise for the output_prefix callback, the\nlow-level change/add_remove interfaces, the callbacks used by\nxdi_diff(), etc.\n\nMark unused arguments in the callback implementations to quiet\n-Wunused-parameter.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n add-interactive.c           |  2 +-\n builtin/add.c               |  2 +-\n builtin/fast-export.c       |  2 +-\n builtin/merge-tree.c        |  2 +-\n builtin/merge.c             |  2 +-\n builtin/rerere.c            |  2 +-\n builtin/reset.c             |  3 ++-\n builtin/submodule--helper.c |  2 +-\n combine-diff.c              |  2 +-\n diff-lib.c                  |  2 +-\n diff.c                      |  7 ++++---\n range-diff.c                | 12 ++++++++----\n revision.c                  | 25 +++++++++++++++----------\n submodule.c                 |  2 +-\n wt-status.c                 |  4 ++--\n 15 files changed, 41 insertions(+), 30 deletions(-)\n\ndiff --git a/add-interactive.c b/add-interactive.c\nindex ae1839c04a..00a0f6f96f 100644\n--- a/add-interactive.c\n+++ b/add-interactive.c\n@@ -724,7 +724,7 @@ static int run_update(struct add_i_state *s, const struct pathspec *ps,\n }\n \n static void revert_from_diff(struct diff_queue_struct *q,\n-\t\t\t     struct diff_options *opt, void *data)\n+\t\t\t     struct diff_options *opt, void *data UNUSED)\n {\n \tint i, add_flags = ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE;\n \ndiff --git a/builtin/add.c b/builtin/add.c\nindex 76277df326..190d1a692a 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -88,7 +88,7 @@ static int fix_unmerged_status(struct diff_filepair *p,\n }\n \n static void update_callback(struct diff_queue_struct *q,\n-\t\t\t    struct diff_options *opt, void *cbdata)\n+\t\t\t    struct diff_options *opt UNUSED, void *cbdata)\n {\n \tint i;\n \tstruct update_callback_data *data = cbdata;\ndiff --git a/builtin/fast-export.c b/builtin/fast-export.c\nindex 3b3314e7b2..39a890fc00 100644\n--- a/builtin/fast-export.c\n+++ b/builtin/fast-export.c\n@@ -409,7 +409,7 @@ static const char *anonymize_oid(const char *oid_hex)\n }\n \n static void show_filemodify(struct diff_queue_struct *q,\n-\t\t\t    struct diff_options *options, void *data)\n+\t\t\t    struct diff_options *options UNUSED, void *data)\n {\n \tint i;\n \tstruct string_list *changed = data;\ndiff --git a/builtin/merge-tree.c b/builtin/merge-tree.c\nindex e3767087bb..ae2c011681 100644\n--- a/builtin/merge-tree.c\n+++ b/builtin/merge-tree.c\n@@ -98,7 +98,7 @@ static void *origin(struct merge_list *entry, unsigned long *size)\n \treturn NULL;\n }\n \n-static int show_outf(void *priv_, mmbuffer_t *mb, int nbuf)\n+static int show_outf(void *priv UNUSED, mmbuffer_t *mb, int nbuf)\n {\n \tint i;\n \tfor (i = 0; i < nbuf; i++)\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex dd474371a2..17b41fbe38 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -776,7 +776,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n }\n \n static void count_diff_files(struct diff_queue_struct *q,\n-\t\t\t     struct diff_options *opt, void *data)\n+\t\t\t     struct diff_options *opt UNUSED, void *data)\n {\n \tint *count = data;\n \ndiff --git a/builtin/rerere.c b/builtin/rerere.c\nindex 8b7392d5b4..94ffb8c21a 100644\n--- a/builtin/rerere.c\n+++ b/builtin/rerere.c\n@@ -14,7 +14,7 @@ static const char * const rerere_usage[] = {\n \tNULL,\n };\n \n-static int outf(void *dummy, mmbuffer_t *ptr, int nbuf)\n+static int outf(void *dummy UNUSED, mmbuffer_t *ptr, int nbuf)\n {\n \tint i;\n \tfor (i = 0; i < nbuf; i++)\ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex 1fa86edb4c..d2e0185e55 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -133,7 +133,8 @@ static void print_new_head_line(struct commit *commit)\n }\n \n static void update_index_from_diff(struct diff_queue_struct *q,\n-\t\tstruct diff_options *opt, void *data)\n+\t\t\t\t   struct diff_options *opt UNUSED,\n+\t\t\t\t   void *data)\n {\n \tint i;\n \tint intent_to_add = *(int *)data;\ndiff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c\nindex 05f2c9bc98..6743fb27bd 100644\n--- a/builtin/submodule--helper.c\n+++ b/builtin/submodule--helper.c\n@@ -1043,7 +1043,7 @@ static void prepare_submodule_summary(struct summary_cb *info,\n }\n \n static void submodule_summary_callback(struct diff_queue_struct *q,\n-\t\t\t\t       struct diff_options *options,\n+\t\t\t\t       struct diff_options *options UNUSED,\n \t\t\t\t       void *data)\n {\n \tint i;\ndiff --git a/combine-diff.c b/combine-diff.c\nindex b0ece95480..1a39b5dde0 100644\n--- a/combine-diff.c\n+++ b/combine-diff.c\n@@ -372,7 +372,7 @@ struct combine_diff_state {\n static void consume_hunk(void *state_,\n \t\t\t long ob, long on,\n \t\t\t long nb, long nn,\n-\t\t\t const char *funcline, long funclen)\n+\t\t\t const char *func UNUSED, long funclen UNUSED)\n {\n \tstruct combine_diff_state *state = state_;\n \ndiff --git a/diff-lib.c b/diff-lib.c\nindex 2edea41a23..dec040c366 100644\n--- a/diff-lib.c\n+++ b/diff-lib.c\n@@ -673,7 +673,7 @@ int index_differs_from(struct repository *r,\n \treturn (has_changes != 0);\n }\n \n-static struct strbuf *idiff_prefix_cb(struct diff_options *opt, void *data)\n+static struct strbuf *idiff_prefix_cb(struct diff_options *opt UNUSED, void *data)\n {\n \treturn data;\n }\ndiff --git a/diff.c b/diff.c\nindex 74ebe247b4..830291080b 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1954,7 +1954,7 @@ static int color_words_output_graph_prefix(struct diff_words_data *diff_words)\n static void fn_out_diff_words_aux(void *priv,\n \t\t\t\t  long minus_first, long minus_len,\n \t\t\t\t  long plus_first, long plus_len,\n-\t\t\t\t  const char *func, long funclen)\n+\t\t\t\t  const char *func UNUSED, long funclen UNUSED)\n {\n \tstruct diff_words_data *diff_words = priv;\n \tstruct diff_words_style *style = diff_words->style;\n@@ -3184,8 +3184,9 @@ static int is_conflict_marker(const char *line, int marker_size, unsigned long l\n }\n \n static void checkdiff_consume_hunk(void *priv,\n-\t\t\t\t   long ob, long on, long nb, long nn,\n-\t\t\t\t   const char *func, long funclen)\n+\t\t\t\t   long ob UNUSED, long on UNUSED,\n+\t\t\t\t   long nb, long nn UNUSED,\n+\t\t\t\t   const char *func UNUSED, long funclen UNUSED)\n \n {\n \tstruct checkdiff_t *data = priv;\ndiff --git a/range-diff.c b/range-diff.c\nindex 8b7d81adc1..8255ab4349 100644\n--- a/range-diff.c\n+++ b/range-diff.c\n@@ -269,14 +269,18 @@ static void find_exact_matches(struct string_list *a, struct string_list *b)\n \thashmap_clear(&map);\n }\n \n-static int diffsize_consume(void *data, char *line, unsigned long len)\n+static int diffsize_consume(void *data,\n+\t\t\t     char *line UNUSED,\n+\t\t\t     unsigned long len UNUSED)\n {\n \t(*(int *)data)++;\n \treturn 0;\n }\n \n-static void diffsize_hunk(void *data, long ob, long on, long nb, long nn,\n-\t\t\t  const char *funcline, long funclen)\n+static void diffsize_hunk(void *data,\n+\t\t\t  long ob UNUSED, long on UNUSED,\n+\t\t\t  long nb UNUSED, long nn UNUSED,\n+\t\t\t  const char *func UNUSED, long funclen UNUSED)\n {\n \tdiffsize_consume(data, NULL, 0);\n }\n@@ -461,7 +465,7 @@ static void patch_diff(const char *a, const char *b,\n \tdiff_flush(diffopt);\n }\n \n-static struct strbuf *output_prefix_cb(struct diff_options *opt, void *data)\n+static struct strbuf *output_prefix_cb(struct diff_options *opt UNUSED, void *data)\n {\n \treturn data;\n }\ndiff --git a/revision.c b/revision.c\nindex 439e34a7c5..ec441b80ef 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -600,10 +600,12 @@ static struct commit *one_relevant_parent(const struct rev_info *revs,\n static int tree_difference = REV_TREE_SAME;\n \n static void file_add_remove(struct diff_options *options,\n-\t\t    int addremove, unsigned mode,\n-\t\t    const struct object_id *oid,\n-\t\t    int oid_valid,\n-\t\t    const char *fullpath, unsigned dirty_submodule)\n+\t\t    int addremove,\n+\t\t    unsigned mode UNUSED,\n+\t\t    const struct object_id *oid UNUSED,\n+\t\t    int oid_valid UNUSED,\n+\t\t    const char *fullpath UNUSED,\n+\t\t    unsigned dirty_submodule UNUSED)\n {\n \tint diff = addremove == '+' ? REV_TREE_NEW : REV_TREE_OLD;\n \tstruct rev_info *revs = options->change_fn_data;\n@@ -614,12 +616,15 @@ static void file_add_remove(struct diff_options *options,\n }\n \n static void file_change(struct diff_options *options,\n-\t\t unsigned old_mode, unsigned new_mode,\n-\t\t const struct object_id *old_oid,\n-\t\t const struct object_id *new_oid,\n-\t\t int old_oid_valid, int new_oid_valid,\n-\t\t const char *fullpath,\n-\t\t unsigned old_dirty_submodule, unsigned new_dirty_submodule)\n+\t\t unsigned old_mode UNUSED,\n+\t\t unsigned new_mode UNUSED,\n+\t\t const struct object_id *old_oid UNUSED,\n+\t\t const struct object_id *new_oid UNUSED,\n+\t\t int old_oid_valid UNUSED,\n+\t\t int new_oid_valid UNUSED,\n+\t\t const char *fullpath UNUSED,\n+\t\t unsigned old_dirty_submodule UNUSED,\n+\t\t unsigned new_dirty_submodule UNUSED)\n {\n \ttree_difference = REV_TREE_DIFFERENT;\n \toptions->flags.has_changes = 1;\ndiff --git a/submodule.c b/submodule.c\nindex 8ac2fca855..fae24ef34a 100644\n--- a/submodule.c\n+++ b/submodule.c\n@@ -832,7 +832,7 @@ static void changed_submodule_data_clear(struct changed_submodule_data *cs_data)\n }\n \n static void collect_changed_submodules_cb(struct diff_queue_struct *q,\n-\t\t\t\t\t  struct diff_options *options,\n+\t\t\t\t\t  struct diff_options *options UNUSED,\n \t\t\t\t\t  void *data)\n {\n \tstruct collect_changed_submodules_cb_data *me = data;\ndiff --git a/wt-status.c b/wt-status.c\nindex 5813174896..76e37a8088 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -438,7 +438,7 @@ static char short_submodule_status(struct wt_status_change_data *d)\n }\n \n static void wt_status_collect_changed_cb(struct diff_queue_struct *q,\n-\t\t\t\t\t struct diff_options *options,\n+\t\t\t\t\t struct diff_options *options UNUSED,\n \t\t\t\t\t void *data)\n {\n \tstruct wt_status *s = data;\n@@ -525,7 +525,7 @@ static int unmerged_mask(struct index_state *istate, const char *path)\n }\n \n static void wt_status_collect_updated_cb(struct diff_queue_struct *q,\n-\t\t\t\t\t struct diff_options *options,\n+\t\t\t\t\t struct diff_options *options UNUSED,\n \t\t\t\t\t void *data)\n {\n \tstruct wt_status *s = data;\n-- \n2.39.0.546.g5ea984bc66\n\n"},{"id":"468987","messageId":"Y5hej4EQU3l68rgT@coredump.intra.peff.net","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"[PATCH 8/9] list-objects-filter: mark unused parameters in virtual functions","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:14:23Z","receivedAt":"2022-12-13T11:16:24Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The \"struct filter\" abstract type defines several virtual function\npointers. Not all of the concrete functions need every parameter, but\nthey have to conform to the generic interface. Mark unused ones to\nsilence -Wunused-parameter.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n list-objects-filter.c | 30 +++++++++++++++---------------\n 1 file changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/list-objects-filter.c b/list-objects-filter.c\nindex b9543545ca..2bbac622be 100644\n--- a/list-objects-filter.c\n+++ b/list-objects-filter.c\n@@ -70,13 +70,13 @@ struct filter {\n };\n \n static enum list_objects_filter_result filter_blobs_none(\n-\tstruct repository *r,\n+\tstruct repository *r UNUSED,\n \tenum list_objects_filter_situation filter_situation,\n \tstruct object *obj,\n-\tconst char *pathname,\n-\tconst char *filename,\n+\tconst char *pathname UNUSED,\n+\tconst char *filename UNUSED,\n \tstruct oidset *omits,\n-\tvoid *filter_data_)\n+\tvoid *filter_data_ UNUSED)\n {\n \tswitch (filter_situation) {\n \tdefault:\n@@ -112,7 +112,7 @@ static enum list_objects_filter_result filter_blobs_none(\n }\n \n static void filter_blobs_none__init(\n-\tstruct list_objects_filter_options *filter_options,\n+\tstruct list_objects_filter_options *filter_options UNUSED,\n \tstruct filter *filter)\n {\n \tfilter->filter_object_fn = filter_blobs_none;\n@@ -159,11 +159,11 @@ static int filter_trees_update_omits(\n }\n \n static enum list_objects_filter_result filter_trees_depth(\n-\tstruct repository *r,\n+\tstruct repository *r UNUSED,\n \tenum list_objects_filter_situation filter_situation,\n \tstruct object *obj,\n-\tconst char *pathname,\n-\tconst char *filename,\n+\tconst char *pathname UNUSED,\n+\tconst char *filename UNUSED,\n \tstruct oidset *omits,\n \tvoid *filter_data_)\n {\n@@ -274,8 +274,8 @@ static enum list_objects_filter_result filter_blobs_limit(\n \tstruct repository *r,\n \tenum list_objects_filter_situation filter_situation,\n \tstruct object *obj,\n-\tconst char *pathname,\n-\tconst char *filename,\n+\tconst char *pathname UNUSED,\n+\tconst char *filename UNUSED,\n \tstruct oidset *omits,\n \tvoid *filter_data_)\n {\n@@ -554,12 +554,12 @@ struct filter_object_type_data {\n };\n \n static enum list_objects_filter_result filter_object_type(\n-\tstruct repository *r,\n+\tstruct repository *r UNUSED,\n \tenum list_objects_filter_situation filter_situation,\n \tstruct object *obj,\n-\tconst char *pathname,\n-\tconst char *filename,\n-\tstruct oidset *omits,\n+\tconst char *pathname UNUSED,\n+\tconst char *filename UNUSED,\n+\tstruct oidset *omits UNUSED,\n \tvoid *filter_data_)\n {\n \tstruct filter_object_type_data *filter_data = filter_data_;\n@@ -675,7 +675,7 @@ static enum list_objects_filter_result filter_combine(\n \tstruct object *obj,\n \tconst char *pathname,\n \tconst char *filename,\n-\tstruct oidset *omits,\n+\tstruct oidset *omits UNUSED,\n \tvoid *filter_data)\n {\n \tstruct combine_filter_data *d = filter_data;\n-- \n2.39.0.546.g5ea984bc66\n\n"},{"id":"468988","messageId":"Y5hfKWD84y72CFHK@coredump.intra.peff.net","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"[PATCH 9/9] userdiff: mark unused parameter in internal callback","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-12-13T11:16:57Z","receivedAt":"2022-12-13T11:17:36Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Since f12fa9ee6c (userdiff: add and use for_each_userdiff_driver(),\n2021-04-08), lookup of userdiffs is done with a generic\nfor_each_userdiff_driver(). But the name lookup doesn't use the \"type\"\nfield, of course.\n\nWe can't get rid of that field from the generic interface because it is\nused by t/helper/test-userdiff.c. So mark it as unused in this instance\nto silence -Wunused-parameter.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n\n userdiff.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/userdiff.c b/userdiff.c\nindex 151d9a5278..e25356a061 100644\n--- a/userdiff.c\n+++ b/userdiff.c\n@@ -315,7 +315,8 @@ struct find_by_namelen_data {\n };\n \n static int userdiff_find_by_namelen_cb(struct userdiff_driver *driver,\n-\t\t\t\t       enum userdiff_driver_type type, void *priv)\n+\t\t\t\t       enum userdiff_driver_type type UNUSED,\n+\t\t\t\t       void *priv)\n {\n \tstruct find_by_namelen_data *cb_data = priv;\n \n-- \n2.39.0.546.g5ea984bc66\n"},{"id":"469000","messageId":"xmqqv8meydbt.fsf@gitster.g","threadId":"58944","inReplyTo":"Y5hdvpbLpXySHFRz@coredump.intra.peff.net","subject":"Re: [PATCH 0/9] more -Wunused-parameter fixes/annotations","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-12-14T01:38:14Z","receivedAt":"2022-12-14T01:38:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> This was supposed to just be annotations, but after staring at a few of\n> the cases, I think we're better off removing the unused parameters. I've\n> floated those ones up to the top of the series.\n\nAll looked sensible.  Thanks.\n>\n>   [1/9]: ls-refs: use repository parameter to iterate refs\n>   [2/9]: blob: drop unused parts of parse_blob_buffer()\n>   [3/9]: list-objects: drop process_gitlink() function\n>   [4/9]: ws: drop unused parameter from ws_blank_line()\n>   [5/9]: xdiff: drop unused parameter in def_ff()\n>   [6/9]: xdiff: mark unused parameter in xdl_call_hunk_func()\n>   [7/9]: diff: mark unused parameters in callbacks\n>   [8/9]: list-objects-filter: mark unused parameters in virtual functions\n>   [9/9]: userdiff: mark unused parameter in internal callback\n>\n>  add-interactive.c           |  2 +-\n>  apply.c                     |  4 ++--\n>  blob.c                      |  3 +--\n>  blob.h                      |  3 +--\n>  builtin/add.c               |  2 +-\n>  builtin/fast-export.c       |  2 +-\n>  builtin/merge-tree.c        |  2 +-\n>  builtin/merge.c             |  2 +-\n>  builtin/rerere.c            |  2 +-\n>  builtin/reset.c             |  3 ++-\n>  builtin/submodule--helper.c |  2 +-\n>  cache.h                     |  2 +-\n>  combine-diff.c              |  2 +-\n>  diff-lib.c                  |  2 +-\n>  diff.c                      | 18 +++++++++---------\n>  list-objects-filter.c       | 30 +++++++++++++++---------------\n>  list-objects.c              | 33 +--------------------------------\n>  ls-refs.c                   |  5 +++--\n>  object.c                    |  5 ++---\n>  range-diff.c                | 12 ++++++++----\n>  ref-filter.c                |  5 +++--\n>  refs.c                      |  9 +++++----\n>  refs.h                      |  6 ++++--\n>  revision.c                  | 25 +++++++++++++++----------\n>  submodule.c                 |  2 +-\n>  userdiff.c                  |  3 ++-\n>  ws.c                        |  2 +-\n>  wt-status.c                 |  4 ++--\n>  xdiff/xdiffi.c              |  2 +-\n>  xdiff/xemit.c               |  4 ++--\n>  30 files changed, 90 insertions(+), 108 deletions(-)\n>\n> -Peff\n"}]}