Thread (1 message) 1 message, 1 author, 2021-09-29

Re: [PATCH v9 1/2] grep: refactor next_match() and match_one_pattern() for external use

From: Junio C Hamano <hidden>
Date: 2021-09-29 05:34:09
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help