diff --git a/CMakeLists.txt b/CMakeLists.txt index 916389424..36e648e8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # c99-designator is disabled because of required mixture of designated and # non-designated initializers in Python Query Module code (`py_module.cpp`). set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall \ - -Werror=switch -Werror=switch-bool -Werror=return-type \ + -Werror=switch -Werror=switch-bool -Werror=implicit-fallthrough \ + -Werror=return-type \ -Werror=return-stack-address \ -Wno-c99-designator \ -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT") diff --git a/src/communication/bolt/v1/states/executing.hpp b/src/communication/bolt/v1/states/executing.hpp index 54504985b..de4b2a00e 100644 --- a/src/communication/bolt/v1/states/executing.hpp +++ b/src/communication/bolt/v1/states/executing.hpp @@ -74,7 +74,7 @@ State RunHandlerV4(Signature signature, TSession &session, State state, Marker m } case Signature::Route: { if constexpr (bolt_minor >= 3) { - if (signature == Signature::Route) return HandleRoute(session); + return HandleRoute(session); } else { spdlog::trace("Supported only in bolt v4.3"); return State::Close; diff --git a/src/storage/v2/constraints.cpp b/src/storage/v2/constraints.cpp index fab6ee4c4..2a71ee2b0 100644 --- a/src/storage/v2/constraints.cpp +++ b/src/storage/v2/constraints.cpp @@ -97,15 +97,15 @@ bool LastCommittedVersionHasLabelProperty(const Vertex &vertex, LabelId label, c if (delta->label == label) { MG_ASSERT(!has_label, "Invalid database state!"); has_label = true; - break; } + break; } case Delta::Action::REMOVE_LABEL: { if (delta->label == label) { MG_ASSERT(has_label, "Invalid database state!"); has_label = false; - break; } + break; } case Delta::Action::ADD_IN_EDGE: case Delta::Action::ADD_OUT_EDGE: diff --git a/src/storage/v3/request_helper.cpp b/src/storage/v3/request_helper.cpp index dd94309ab..481741f60 100644 --- a/src/storage/v3/request_helper.cpp +++ b/src/storage/v3/request_helper.cpp @@ -472,12 +472,14 @@ std::array, 2> GetEdgesFromVertex(const VertexAccessor if (edges.HasValue()) { in_edges = edges.GetValue(); } + break; } case memgraph::msgs::EdgeDirection::OUT: { auto edges = vertex_accessor.OutEdges(View::OLD); if (edges.HasValue()) { out_edges = edges.GetValue(); } + break; } case memgraph::msgs::EdgeDirection::BOTH: { auto maybe_in_edges = vertex_accessor.InEdges(View::OLD); @@ -489,6 +491,7 @@ std::array, 2> GetEdgesFromVertex(const VertexAccessor if (maybe_out_edges.HasValue()) { out_edges = maybe_out_edges.GetValue(); } + break; } }