Commit 7f993812 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix compiler warnings

metadata_lock_info_duration[]: Remove the unused variable.

Add some comments /* fall through */ to silence -Wimplicit-fallthrough
parent 6be93c3b
......@@ -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 */
......
......@@ -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:
......
......@@ -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,
......
......@@ -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). */
......
......@@ -1537,6 +1537,7 @@ row_sel(
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
default:
......@@ -1595,6 +1596,7 @@ row_sel(
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
default:
......@@ -4203,6 +4205,7 @@ row_search_for_mysql(
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
default:
......@@ -4273,6 +4276,7 @@ row_search_for_mysql(
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
default:
......@@ -4550,6 +4554,7 @@ row_search_for_mysql(
prebuilt->new_rec_locks = 1;
}
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
case DB_LOCK_WAIT:
......
......@@ -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,
......
......@@ -1543,6 +1543,7 @@ row_sel(
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
default:
......@@ -1601,6 +1602,7 @@ row_sel(
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
default:
......@@ -4172,6 +4174,7 @@ row_search_for_mysql(
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
default:
......@@ -4248,6 +4251,7 @@ row_search_for_mysql(
switch (err) {
case DB_SUCCESS_LOCKED_REC:
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
default:
......@@ -4534,6 +4538,7 @@ row_search_for_mysql(
prebuilt->new_rec_locks = 1;
}
err = DB_SUCCESS;
/* fall through */
case DB_SUCCESS:
break;
case DB_LOCK_WAIT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment