public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Hamza Mahfooz <someguy@effective-light•com>
Cc: git@vger•kernel.org, Jeff King <peff@peff•net>,
	Eric Sunshine <sunshine@sunshineco•com>
Subject: Re: [PATCH v9 1/2] grep: refactor next_match() and match_one_pattern() for external use
Date: Tue, 28 Sep 2021 22:34:05 -0700	[thread overview]
Message-ID: <xmqqfstoeyia.fsf@gitster.g> (raw)
In-Reply-To: <20210929011952.611792-1-someguy@effective-light.com> (Hamza Mahfooz's message of "Tue, 28 Sep 2021 21:19:51 -0400")

Needs a magic comment to squelch a compiler warning.

grep.c:1187:8: error: this statement may fall through [-Werror=implicit-fallthrough=]

 grep.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/grep.c b/grep.c
index 6f8bc95703..fe847a0111 100644
--- a/grep.c
+++ b/grep.c
@@ -1187,6 +1187,7 @@ int grep_next_match(struct grep_opt *opt,
 				if ((field != GREP_HEADER_FIELD_MAX) &&
 				    (p->field != field))
 					continue;
+				/* fall thru */
 			case GREP_PATTERN: /* atom */
 			case GREP_PATTERN_BODY:
 				hit |= match_next_pattern(p, bol, eol, ctx,
-- 
2.33.0-839-gdb857d08e8


      parent reply	other threads:[~2021-09-29  5:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29  1:19 [PATCH v9 1/2] grep: refactor next_match() and match_one_pattern() for external use Hamza Mahfooz
2021-09-29  1:19 ` [PATCH v9 2/2] pretty: colorize pattern matches in commit messages Hamza Mahfooz
2021-09-29  5:34 ` Junio C Hamano [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=xmqqfstoeyia.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    --cc=someguy@effective-light$(echo .)com \
    --cc=sunshine@sunshineco$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox