All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Lars Schneider <larsxschneider@gmail.com>
Subject: Re: [PATCH] sequencer: silence -Wtautological-constant-out-of-range-compare
Date: Wed, 9 Nov 2016 14:54:58 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1611091453580.72596@virtualbox> (raw)
In-Reply-To: <20161109035728.v2mqvtj4ep4dj74j@sigill.intra.peff.net>

Hi Peff,

On Tue, 8 Nov 2016, Jeff King wrote:

> diff --git a/sequencer.c b/sequencer.c
> index 5fd75f30d..6f0ff9e41 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -629,7 +629,7 @@ static const char *todo_command_strings[] = {
>  
>  static const char *command_to_string(const enum todo_command command)
>  {
> -	if (command < ARRAY_SIZE(todo_command_strings))
> +	if ((size_t)command < ARRAY_SIZE(todo_command_strings))
>  		return todo_command_strings[command];
>  	die("Unknown command: %d", command);

I have come to prefer a slightly different approach. Will send it out in a
moment.

Ciao,
Dscho

      reply	other threads:[~2016-11-09 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09  3:57 [PATCH] sequencer: silence -Wtautological-constant-out-of-range-compare Jeff King
2016-11-09 13:54 ` Johannes Schindelin [this message]

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=alpine.DEB.2.20.1611091453580.72596@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=larsxschneider@gmail.com \
    --cc=peff@peff.net \
    /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.