Re: [PATCH 2/4] test-line-buffer: simplify command parsing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 22, 2017, 03:47 UTC
- Message-ID
- <xmqqh8vvl7hk.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170921062242.t63u2gvpysrrmijs@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> However, each case arm of the switch falls through to the > one below it. This is pointless (we know that a command > starting with 'b' does not need to check any of the commands > in the 'c' block), and it makes gcc's -Wimplicit-fallthrough > complain.
Wow, this is an embarassment. The code tries to cleverly optimize it, and then fails miserably.
The updated one reads good. Thanks.