1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-08-08 02:02:57 +03:00

Added -Wimplicit-fallthrough

Added compiler flag to check for fall through in case statements.
This commit is contained in:
mkaruza
2018-12-31 15:04:10 +01:00
parent 7e9419e811
commit b9f371c269
4 changed files with 18 additions and 4 deletions

View File

@@ -875,7 +875,7 @@ void wsrep::server_state::on_sync()
break;
case s_connected:
state(lock, s_joiner);
// fall through
WSREP_FALLTHROUGH;
case s_joiner:
state(lock, s_initializing);
break;
@@ -885,7 +885,7 @@ void wsrep::server_state::on_sync()
break;
case s_initialized:
state(lock, s_joined);
// fall through
WSREP_FALLTHROUGH;
default:
/* State */
state(lock, s_synced);

View File

@@ -551,7 +551,7 @@ int wsrep::transaction::before_rollback()
case s_preparing:
// Error detected during prepare phase
state(lock, s_must_abort);
// fall through
WSREP_FALLTHROUGH;
case s_executing:
// Voluntary rollback
if (is_streaming())
@@ -697,7 +697,7 @@ int wsrep::transaction::after_statement()
break;
}
// Continue to replay if rollback() changed the state to s_must_replay
// Fall through
WSREP_FALLTHROUGH;
case s_must_replay:
{
state(lock, s_replaying);