Set switch statement warnings as errors
Summary: The warnings lifted to errors should help us track down cases which haven't been covered in a switch. Obviously, using the default case will not trigger these errors, so default should only be used when we actually want to cover more cases. Reviewers: florijan, dgleich, mferencevic Reviewed By: dgleich Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D975
This commit is contained in:
parent
f50d87f736
commit
de7a788311
@ -72,7 +72,7 @@ endif()
|
||||
# set(CMAKE_CXX_STANDARD 17)
|
||||
# set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
# For now, explicitly set -std= flag for C++17.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z -Wall")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z -Wall -Werror=switch -Werror=switch-bool")
|
||||
|
||||
# Don't omit frame pointer in RelWithDebInfo, for additional callchain debug.
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
|
@ -466,8 +466,6 @@ class LabelPropertyIndex {
|
||||
return lexicographical_compare(ma.begin(), ma.end(), mb.begin(),
|
||||
mb.end(), cmp);
|
||||
}
|
||||
default:
|
||||
LOG(FATAL) << "Unimplemented type operator.";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user