diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index c97f3fb..949897c 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -1613,8 +1613,8 @@ else if (c >= CHAR_8) break; - /* Fall through with a digit less than 8 */ - + /* Fall through */ + /* \0 always starts an octal number, but we may drop through to here with a larger first octal digit. The original code used just to take the least significant 8 bits of octal numbers (I think this is what early Perls used @@ -6425,8 +6425,8 @@ for (;; pptr++) length_prevgroup = 3 + 3*LINK_SIZE; group_return = -1; /* Set "may match empty string" */ - /* Now fall through and treat as a repeated OP_BRA. */ - /* VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV */ + /* Now treat as a repeated OP_BRA. */ + /* Fall through */ /* If previous was a bracket group, we may have to replicate it in certain cases. Note that at this point we can encounter only the "basic" @@ -8552,7 +8552,8 @@ for (;; pptr++) goto RECURSE_OR_BACKREF_LENGTH; } - /* Fall through for groups >= 10 - picking up group twice does no harm. */ + /* Fall through */ + /* For groups >= 10 - picking up group twice does no harm. */ /* A true recursion implies not fixed length, but a subroutine call may be OK. Back reference "recursions" are also failed. */ diff --git a/src/pcre2_dfa_match.c b/src/pcre2_dfa_match.c index 518eb83..1fd1550 100644 --- a/src/pcre2_dfa_match.c +++ b/src/pcre2_dfa_match.c @@ -2129,6 +2129,7 @@ for (;;) case 0x2029: #endif /* Not EBCDIC */ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) break; + /* Fall through */ case CHAR_LF: ADD_NEW(state_offset + 1, 0); diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c index 87c57c4..859436e 100644 --- a/src/pcre2_jit_compile.c +++ b/src/pcre2_jit_compile.c @@ -3829,6 +3829,7 @@ while (TRUE) { case OP_CHARI: caseless = TRUE; + /* Fall through */ case OP_CHAR: last = FALSE; cc++; @@ -3860,6 +3861,7 @@ while (TRUE) case OP_MINPLUSI: case OP_POSPLUSI: caseless = TRUE; + /* Fall through */ case OP_PLUS: case OP_MINPLUS: case OP_POSPLUS: @@ -3868,6 +3870,7 @@ while (TRUE) case OP_EXACTI: caseless = TRUE; + /* Fall through */ case OP_EXACT: repeat = GET2(cc, 1); last = FALSE; @@ -3878,6 +3881,7 @@ while (TRUE) case OP_MINQUERYI: case OP_POSQUERYI: caseless = TRUE; + /* Fall through */ case OP_QUERY: case OP_MINQUERY: case OP_POSQUERY: diff --git a/src/pcre2_match.c b/src/pcre2_match.c index abc404d..890b961 100644 --- a/src/pcre2_match.c +++ b/src/pcre2_match.c @@ -5352,9 +5352,10 @@ fprintf(stderr, "++ op=%d\n", *Fecode); (char *)assert_accept_frame + offsetof(heapframe, ovector), assert_accept_frame->offset_top * sizeof(PCRE2_SIZE)); Foffset_top = assert_accept_frame->offset_top; - - /* Fall through. In the case of a match, the captures have already - been put into the current frame. */ + + /* Fall through */ + /* In the case of a match, the captures have already been put into + the current frame. */ case MATCH_MATCH: condition = Lpositive; /* TRUE for positive assertion */ @@ -5649,8 +5650,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); if ((mb->moptions & PCRE2_NOTEOL) != 0) RRETURN(MATCH_NOMATCH); if ((mb->poptions & PCRE2_DOLLAR_ENDONLY) == 0) goto ASSERT_NL_OR_EOS; - /* ... else fall through for endonly */ - + /* Fall through */ /* Unconditional end of subject assertion (\z) */ case OP_EOD: diff --git a/src/pcre2_study.c b/src/pcre2_study.c index a92fb11..bfd651a 100644 --- a/src/pcre2_study.c +++ b/src/pcre2_study.c @@ -1448,6 +1448,10 @@ do classmap = ((tcode[1 + LINK_SIZE] & XCL_MAP) == 0)? NULL : (uint8_t *)(tcode + 1 + LINK_SIZE + 1); #endif + /* It seems that the fall through comment must be outside the #ifdef if + it is to avoid the gcc compiler warning. */ + + /* Fall through */ /* Enter here for a negative non-XCLASS. In the 8-bit library, if we are in UTF mode, any byte with a value >= 0xc4 is a potentially valid starter diff --git a/src/pcre2grep.c b/src/pcre2grep.c index b84a46e..43fdb3b 100644 --- a/src/pcre2grep.c +++ b/src/pcre2grep.c @@ -3218,7 +3218,7 @@ handle_option(int letter, int options) switch(letter) { case N_FOFFSETS: file_offsets = TRUE; break; - case N_HELP: help(); pcre2grep_exit(0); + case N_HELP: help(); pcre2grep_exit(0); break; /* Stops compiler warning */ case N_LBUFFER: line_buffered = TRUE; break; case N_LOFFSETS: line_offsets = number = TRUE; break; case N_NOJIT: use_jit = FALSE; break;