diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-30 12:51:37 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-30 14:11:59 +0300 |
commit | f42a23178edee5dd1fb6e0f76bbe88ea2a98a045 (patch) | |
tree | 471f5d552f9b285bf2ba5940854783ea3708bbdf /storage | |
parent | a379f151b18e4bc7e4c26be5f5e1254a59e27bfa (diff) | |
download | mariadb-git-f42a23178edee5dd1fb6e0f76bbe88ea2a98a045.tar.gz |
MDEV-20425: Fix -Wimplicit-fallthrough
With --skip-debug-assert, DBUG_ASSERT(false) will allow execution to
continue. Hence, we will need /* fall through */ after them.
Some DBUG_ASSERT(0) were replaced by break; when the switch () statement
was followed by DBUG_ASSERT(0).
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/fil/fil0fil.cc | 1 | ||||
-rw-r--r-- | storage/innobase/handler/handler0alter.cc | 2 | ||||
-rw-r--r-- | storage/innobase/mtr/mtr0mtr.cc | 2 | ||||
-rw-r--r-- | storage/innobase/row/row0log.cc | 2 | ||||
-rw-r--r-- | storage/innobase/row/row0uins.cc | 3 |
5 files changed, 7 insertions, 3 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 5bf7fb9df58..e22b1c4e314 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -826,6 +826,7 @@ static void fil_flush_low(fil_space_t* space, bool metadata = false) switch (space->purpose) { case FIL_TYPE_TEMPORARY: ut_ad(0); // we already checked for this + /* fall through */ case FIL_TYPE_TABLESPACE: case FIL_TYPE_IMPORT: fil_n_pending_tablespace_flushes++; diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index d119fca82b6..a4ba9651dbe 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -2135,7 +2135,7 @@ innobase_col_to_mysql( case DATA_SYS: /* These column types should never be shipped to MySQL. */ ut_ad(0); - + /* fall through */ case DATA_FLOAT: case DATA_DOUBLE: case DATA_DECIMAL: diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index 751b7ec36ec..5504eb618fe 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -754,7 +754,7 @@ mtr_t::Command::prepare_write() switch (m_impl->m_log_mode) { case MTR_LOG_SHORT_INSERTS: ut_ad(0); - /* fall through (write no redo log) */ + /* fall through */ case MTR_LOG_NO_REDO: case MTR_LOG_NONE: ut_ad(m_impl->m_log.size() == 0); diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index 71fb7fc5f7f..2b1c2d9e0be 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -1790,6 +1790,7 @@ row_log_table_apply_insert( break; default: ut_ad(0); + /* fall through */ case DB_INVALID_NULL: ut_ad(row == NULL); return(error); @@ -2078,6 +2079,7 @@ row_log_table_apply_update( break; default: ut_ad(0); + /* fall through */ case DB_INVALID_NULL: ut_ad(row == NULL); return(error); diff --git a/storage/innobase/row/row0uins.cc b/storage/innobase/row/row0uins.cc index 173233f1cd5..77c54aade87 100644 --- a/storage/innobase/row/row0uins.cc +++ b/storage/innobase/row/row0uins.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2018, MariaDB Corporation. +Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -583,6 +583,7 @@ row_undo_ins( switch (node->rec_type) { default: ut_ad(!"wrong undo record type"); + /* fall through */ case TRX_UNDO_INSERT_REC: /* Skip the clustered index (the first index) */ node->index = dict_table_get_next_index(node->index); |