summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2019-03-26 17:36:20 +0200
committerMonty <monty@mariadb.org>2019-04-01 19:47:24 +0300
commite3bffd579f4a1bf8e08dc714971729faeb371f63 (patch)
tree4d069a019de038e684a8c3ad4a9d86b4b871b1e6
parentb5615eff0d00cfb4c60b9d1bf67094da7c2258a6 (diff)
downloadmariadb-git-e3bffd579f4a1bf8e08dc714971729faeb371f63.tar.gz
Removed some warnings from -Wimplicit-fallthrough= with build scripts
-rwxr-xr-xBUILD/SETUP.sh2
-rw-r--r--pcre/pcre_dfa_exec.c1
-rw-r--r--pcre/pcre_exec.c2
-rw-r--r--pcre/pcregrep.c2
4 files changed, 4 insertions, 3 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 7e6f0831423..6cf2a18404c 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -141,7 +141,7 @@ elif [ "x$warning_mode" = "xmaintainer" ]; then
debug_extra_cflags="-g3"
else
# Both C and C++ warnings
- warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing"
+ warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing -Wimplicit-fallthrough=2"
# For more warnings, uncomment the following line
# warnings="$warnings -Wshadow"
diff --git a/pcre/pcre_dfa_exec.c b/pcre/pcre_dfa_exec.c
index f333381d088..830c4e4be48 100644
--- a/pcre/pcre_dfa_exec.c
+++ b/pcre/pcre_dfa_exec.c
@@ -2198,6 +2198,7 @@ for (;;)
case 0x2029:
#endif /* Not EBCDIC */
if ((md->moptions & PCRE_BSR_ANYCRLF) != 0) break;
+ /* fall through */
case CHAR_LF:
ADD_NEW(state_offset + 1, 0);
diff --git a/pcre/pcre_exec.c b/pcre/pcre_exec.c
index 93256d32455..88a9a79e489 100644
--- a/pcre/pcre_exec.c
+++ b/pcre/pcre_exec.c
@@ -2086,7 +2086,7 @@ for (;;)
case OP_CIRC:
if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH);
- /* Start of subject assertion */
+ /* Fall through. Start of subject assertion */
case OP_SOD:
if (eptr != md->start_subject) RRETURN(MATCH_NOMATCH);
diff --git a/pcre/pcregrep.c b/pcre/pcregrep.c
index 79d9e286c75..22c43bcda00 100644
--- a/pcre/pcregrep.c
+++ b/pcre/pcregrep.c
@@ -2407,7 +2407,7 @@ handle_option(int letter, int options)
switch(letter)
{
case N_FOFFSETS: file_offsets = TRUE; break;
- case N_HELP: help(); pcregrep_exit(0);
+ case N_HELP: help(); pcregrep_exit(0); break;
case N_LBUFFER: line_buffered = TRUE; break;
case N_LOFFSETS: line_offsets = number = TRUE; break;
case N_NOJIT: study_options &= ~PCRE_STUDY_JIT_COMPILE; break;