All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 0/13] parseopt fixes from -Wunused-parameters
Date: Mon, 5 Nov 2018 13:49:00 -0500	[thread overview]
Message-ID: <20181105184900.GA30690@sigill.intra.peff.net> (raw)
In-Reply-To: <CACsJy8Dz5Meu2fnNOiFXcw4LTROxBAn05OSZhYBih7ac0jQFzA@mail.gmail.com>

On Mon, Nov 05, 2018 at 05:51:07PM +0100, Duy Nguyen wrote:

> On Mon, Nov 5, 2018 at 7:39 AM Jeff King <peff@peff.net> wrote:
> >
> > Continuing my exploration of what -Wunused-parameters can show us, here
> > are some bug-fixes related to parse-options callbacks.
> >
> > This is the last of the actual bug-fixes I've found. After this, I have
> > about 60 patches worth of cleanups (i.e., dropping the unused
> > parameters), and then I have a series to annotate parameters that must
> > be unused (e.g., for functions that must conform to callback
> > interfaces). After we can start compiling with -Wunused-parameters,
> > assuming we don't find the annotations too cumbersome.
> 
> Another good thing from this series is there are fewer --no-options to complete.
> 
> About the annotating unused parameters related to segfault bug fixes
> in this series. Should we just add something like
> 
>  if (unset)
>     BUG("This code does not support --no-stuff");
> 
> which could be done in the same patches that fix the segfault, and it
> extends the diff context a bit to see what these callbacks do without
> opening up the editor, and also serves as a kind of annotation?

That's done in the final patch. I did originally do it alongside the
actual segfault fixes, but since it needs doing in so many other
callbacks, too, it made sense to me to do it all together.

-Peff

  reply	other threads:[~2018-11-05 18:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05  6:37 [PATCH 0/13] parseopt fixes from -Wunused-parameters Jeff King
2018-11-05  6:38 ` [PATCH 01/13] apply: mark include/exclude options as NONEG Jeff King
2018-11-05  7:07   ` Junio C Hamano
2018-11-05  6:38 ` [PATCH 02/13] am: handle --no-patch-format option Jeff King
2018-11-05  7:08   ` Junio C Hamano
2018-11-05  6:39 ` [PATCH 03/13] ls-files: mark exclude options as NONEG Jeff King
2018-11-05  6:39 ` [PATCH 04/13] pack-objects: mark index-version option " Jeff King
2018-11-05  6:40 ` [PATCH 05/13] cat-file: mark batch options with NONEG Jeff King
2018-11-05  6:40 ` [PATCH 06/13] status: mark --find-renames option " Jeff King
2018-11-05  6:41 ` [PATCH 07/13] format-patch: mark "--no-numbered" " Jeff King
2018-11-05  6:42 ` [PATCH 08/13] show-branch: mark --reflog option as NONEG Jeff King
2018-11-05  6:43 ` [PATCH 09/13] tag: mark "--message" option with NONEG Jeff King
2018-11-05  6:43 ` [PATCH 10/13] cat-file: report an error on multiple --batch options Jeff King
2018-11-05  6:43 ` [PATCH 11/13] apply: return -1 from option callback instead of calling exit(1) Jeff King
2018-11-05  6:44 ` [PATCH 12/13] parse-options: drop OPT_DATE() Jeff King
2018-11-05 18:34   ` [PATCH] parse-options: deprecate OPT_DATE Carlo Marcelo Arenas Belón
2018-11-05 18:49     ` Jeff King
2018-11-05  6:45 ` [PATCH 13/13] assert NOARG/NONEG behavior of parse-options callbacks Jeff King
2018-11-05 16:51 ` [PATCH 0/13] parseopt fixes from -Wunused-parameters Duy Nguyen
2018-11-05 18:49   ` Jeff King [this message]
2018-11-05 18:51     ` Duy Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181105184900.GA30690@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.