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

[PATCH 0/12] more unused-parameter fixes / annotations

From
Jeff King <peff@peff.net>
Date
Oct 18, 2022, 01:00 UTC
Message-ID
<Y036whEorZV0rOgB@coredump.intra.peff.net>

Here's another batch of UNUSED markings. I've floated the less-obvious ones to the top. Patches 4-12 are trivially correct in the sense that the compiler would tell us if we were wrong about it being unused. But I tried where appropriate to reason out why ignoring a parameter wasn't an unintentional bug.

  [01/12]: diffstat_consume(): assert non-zero length
  [02/12]: submodule--helper: drop unused argc from module_list_compute()
  [03/12]: update-index: drop unused argc from do_reupdate()
  [04/12]: mark unused parameters in trivial compat functions
  [05/12]: object-file: mark unused parameters in hash_unknown functions
  [06/12]: string-list: mark unused callback parameters
  [07/12]: date: mark unused parameters in handler functions
  [08/12]: apply: mark unused parameters in handlers
  [09/12]: apply: mark unused parameters in noop error/warning routine
  [10/12]: convert: mark unused parameter in null stream filter
  [11/12]: diffcore-pickaxe: mark unused parameters in pickaxe functions
  [12/12]: ll-merge: mark unused parameters in callbacks
 apply.c                     | 18 +++++++++---------
 archive.c                   |  2 +-
 builtin/gc.c                |  2 +-
 builtin/remote.c            |  2 +-
 builtin/submodule--helper.c | 18 +++++++++---------
 builtin/update-index.c      |  6 +++---
 compat/nonblock.c           |  2 +-
 convert.c                   |  4 ++--
 date.c                      |  6 +++---
 diff.c                      |  3 +++
 diffcore-pickaxe.c          |  4 ++--
 exec-cmd.c                  |  2 +-
 git-compat-util.h           | 16 ++++++++++------
 ll-merge.c                  | 18 +++++++++---------
 merge-ort.c                 |  2 +-
 object-file.c               | 15 ++++++++++-----
 reflog-walk.c               |  2 +-
 string-list.c               |  2 +-
 t/helper/test-path-utils.c  |  3 ++-
 19 files changed, 70 insertions(+), 57 deletions(-)
-Peff
Next: Jeff King
Message 1 of 13 in “more unused-parameter fixes / annotations”
  1. 0/12 more unused-parameter fixes / annotationsJeff King, Oct 18, 2022
  2. 01/12 diffstat_consume(): assert non-zero lengthJeff King, Oct 18, 2022
  3. 02/12 submodule--helper: drop unused argc from module_list_compute()Jeff King, Oct 18, 2022
  4. 03/12 update-index: drop unused argc from do_reupdate()Jeff King, Oct 18, 2022
  5. 04/12 mark unused parameters in trivial compat functionsJeff King, Oct 18, 2022
  6. 05/12 object-file: mark unused parameters in hash_unknown functionsJeff King, Oct 18, 2022
  7. 06/12 string-list: mark unused callback parametersJeff King, Oct 18, 2022
  8. 07/12 date: mark unused parameters in handler functionsJeff King, Oct 18, 2022
  9. 08/12 apply: mark unused parameters in handlersJeff King, Oct 18, 2022
  10. 09/12 apply: mark unused parameters in noop error/warning routineJeff King, Oct 18, 2022
  11. 11/12 diffcore-pickaxe: mark unused parameters in pickaxe functionsJeff King, Oct 18, 2022
  12. 10/12 convert: mark unused parameter in null stream filterJeff King, Oct 18, 2022
  13. 12/12 ll-merge: mark unused parameters in callbacksJeff King, Oct 18, 2022

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.