Add suitable "fall through" comments for latest gcc warnings.

This commit is contained in:
Philip.Hazel 2017-06-03 17:50:03 +00:00
parent e4c86e2ced
commit f850015168
6 changed files with 21 additions and 11 deletions

View File

@ -1613,7 +1613,7 @@ 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
@ -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. */

View File

@ -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);

View File

@ -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:

View File

@ -5353,8 +5353,9 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
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:

View File

@ -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

View File

@ -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;