summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-01 15:29:34 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-01 15:40:49 +0300
commit7f99381288a280c27f74edb3d4ed6bbad4f172b9 (patch)
treecbdeebbabcccd48cb295255e1224acbdda9f203f
parent6be93c3b8a1d8c080d73750e3804752ad80f56d1 (diff)
downloadmariadb-git-7f99381288a280c27f74edb3d4ed6bbad4f172b9.tar.gz
Fix compiler warnings
metadata_lock_info_duration[]: Remove the unused variable. Add some comments /* fall through */ to silence -Wimplicit-fallthrough
-rw-r--r--pcre/pcre_compile.c5
-rw-r--r--pcre/pcre_exec.c2
-rw-r--r--plugin/metadata_lock_info/metadata_lock_info.cc6
-rw-r--r--sql/ha_partition.cc2
-rw-r--r--storage/innobase/row/row0sel.cc5
-rw-r--r--storage/ndb/include/util/ndb_opts.h1
-rw-r--r--storage/xtradb/row/row0sel.cc5
7 files changed, 18 insertions, 8 deletions
diff --git a/pcre/pcre_compile.c b/pcre/pcre_compile.c
index 42f204cdfff..1a916693e69 100644
--- a/pcre/pcre_compile.c
+++ b/pcre/pcre_compile.c
@@ -1249,6 +1249,7 @@ else
if ((c = *ptr) >= CHAR_8) break;
+ /* fall through */
/* Fall through with a digit less than 8 */
/* \0 always starts an octal number, but we may drop through to here with a
@@ -5097,6 +5098,8 @@ for (;; ptr++)
either not match or match, depending on whether the class is or is
not negated. */
+ /* fall through */
+
default:
if (local_negate &&
(xclass || tempptr[2] != CHAR_RIGHT_SQUARE_BRACKET))
@@ -7165,7 +7168,7 @@ for (;; ptr++)
goto FAILED;
}
/* Fall through to handle (?P< as (?< is handled */
-
+ /* fall through */
/* ------------------------------------------------------------ */
DEFINE_NAME: /* Come here from (?< handling */
diff --git a/pcre/pcre_exec.c b/pcre/pcre_exec.c
index 1a9bdd546ee..70ac2fea381 100644
--- a/pcre/pcre_exec.c
+++ b/pcre/pcre_exec.c
@@ -1053,6 +1053,8 @@ for (;;)
group. At this point, the return is converted into MATCH_NOMATCH so that
previous backup points can be taken. */
+ /* fall through */
+
case OP_ONCE:
case OP_BRA:
case OP_SBRA:
diff --git a/plugin/metadata_lock_info/metadata_lock_info.cc b/plugin/metadata_lock_info/metadata_lock_info.cc
index d434ed9a693..48001a9e527 100644
--- a/plugin/metadata_lock_info/metadata_lock_info.cc
+++ b/plugin/metadata_lock_info/metadata_lock_info.cc
@@ -44,12 +44,6 @@ static const LEX_STRING metadata_lock_info_lock_mode[] = {
{ C_STRING_WITH_LEN("MDL_EXCLUSIVE") },
};
-static const LEX_STRING metadata_lock_info_duration[] = {
- { C_STRING_WITH_LEN("MDL_STATEMENT") },
- { C_STRING_WITH_LEN("MDL_TRANSACTION") },
- { C_STRING_WITH_LEN("MDL_EXPLICIT") },
-};
-
static ST_FIELD_INFO i_s_metadata_lock_info_fields_info[] =
{
{"THREAD_ID", 20, MYSQL_TYPE_LONGLONG, 0,
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 0824fc9b76b..e0bca209d81 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -7899,7 +7899,7 @@ uint32 ha_partition::calculate_key_hash_value(Field **field_array)
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_GEOMETRY:
- /* fall through. */
+ /* fall through */
default:
DBUG_ASSERT(0); // New type?
/* Fall through for default hashing (5.5). */
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc
index 5978a1e3491..bdee3863797 100644
--- a/storage/innobase/row/row0sel.cc
+++ b/storage/innobase/row/row0sel.cc
@@ -1537,6 +1537,7 @@ rec_loop:
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
default:
@@ -1595,6 +1596,7 @@ skip_lock:
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
default:
@@ -4203,6 +4205,7 @@ wait_table_again:
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
default:
@@ -4273,6 +4276,7 @@ rec_loop:
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
default:
@@ -4550,6 +4554,7 @@ no_gap_lock:
prebuilt->new_rec_locks = 1;
}
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
case DB_LOCK_WAIT:
diff --git a/storage/ndb/include/util/ndb_opts.h b/storage/ndb/include/util/ndb_opts.h
index d47a0243247..b753a63cd0f 100644
--- a/storage/ndb/include/util/ndb_opts.h
+++ b/storage/ndb/include/util/ndb_opts.h
@@ -165,6 +165,7 @@ ndb_std_get_one_option(int optid,
/* fall through to add the connectstring to the end
* and set opt_ndbcluster_connectstring
*/
+ /* fall through */
case OPT_NDB_CONNECTSTRING:
if (opt_ndb_connectstring && opt_ndb_connectstring[0])
my_snprintf(opt_ndb_constrbuf+opt_ndb_constrbuf_len,
diff --git a/storage/xtradb/row/row0sel.cc b/storage/xtradb/row/row0sel.cc
index b0c6565ab2e..3a25cca8a28 100644
--- a/storage/xtradb/row/row0sel.cc
+++ b/storage/xtradb/row/row0sel.cc
@@ -1543,6 +1543,7 @@ rec_loop:
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
default:
@@ -1601,6 +1602,7 @@ skip_lock:
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
default:
@@ -4172,6 +4174,7 @@ wait_table_again:
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
default:
@@ -4248,6 +4251,7 @@ rec_loop:
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
default:
@@ -4534,6 +4538,7 @@ no_gap_lock:
prebuilt->new_rec_locks = 1;
}
err = DB_SUCCESS;
+ /* fall through */
case DB_SUCCESS:
break;
case DB_LOCK_WAIT: