From: Johannes Schindelin Date: Wed, 09 Nov 2016 13:54:58 GMT Subject: Re: [PATCH] sequencer: silence -Wtautological-constant-out-of-range-compare Message-ID: 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