[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    [PATCH 0/8] more unused parameters in parseopt callbacks
From:       Jeff King <peff () peff ! net>
Date:       2023-08-31 7:09:35
Message-ID: 20230831070935.GA3197495 () coredump ! intra ! peff ! net
[Download RAW message or body]

Here are some more patches silencing -Wunused-parameter warnings. I've
prepared them on top of the patches queued in jk/unused-post-2.42, but
they should apply equally well directly on 'master'.

These ones are a bit more interesting than usual, because there were
some actual code changes and cleanups that seemed preferable to just
annotating.

I'm adding René to the cc based on our earlier discussion of callbacks
which ignore opt->value. See patch 3 in particular. Also some of your
recent work gets a nice shout-out in patch 2. :)

  [1/8]: merge: make xopts a strvec
  [2/8]: merge: simplify parsing of "-n" option
  [3/8]: parse-options: prefer opt->value to globals in callbacks
  [4/8]: parse-options: mark unused "opt" parameter in callbacks
  [5/8]: merge: do not pass unused opt->value parameter
  [6/8]: parse-options: add more BUG_ON() annotations
  [7/8]: interpret-trailers: mark unused "unset" parameters in option callbacks
  [8/8]: parse-options: mark unused parameters in noop callback

 builtin/add.c                |  2 ++
 builtin/checkout-index.c     |  2 +-
 builtin/describe.c           |  6 +++--
 builtin/fast-export.c        | 36 +++++++++++++++++-------------
 builtin/fetch.c              |  3 ++-
 builtin/gc.c                 |  2 +-
 builtin/interpret-trailers.c | 18 +++++++--------
 builtin/log.c                | 18 ++++++++++-----
 builtin/merge.c              | 43 +++++++++---------------------------
 builtin/pack-objects.c       | 27 ++++++++++++----------
 builtin/read-tree.c          |  2 +-
 builtin/update-index.c       |  4 ++--
 parse-options-cb.c           |  4 +++-
 13 files changed, 84 insertions(+), 83 deletions(-)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic