aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBenjamin Barenblat <bbaren@mit.edu>2015-08-15 15:39:45 -0400
committerBenjamin Barenblat <bbaren@mit.edu>2015-08-15 15:39:45 -0400
commit7cd5a653ff67d5689a3398c2759be775a49a9559 (patch)
tree02aa2ade53f95b8b447589f9079d7f87b01b8a47
parentcebf245504b75469f19d3cc0a6f2f66aefa66947 (diff)
Handle invalid `Log::Class`
Add a case of `Log::Class::Count` to the switch statement that dispatches on `Log::Class`. The case simply calls the `UNREACHABLE` macro.
-rw-r--r--src/common/logging/backend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 0a081e7d..92e8e742 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -66,8 +66,9 @@ const char* GetLogClassName(Class log_class) {
ALL_LOG_CLASSES()
#undef CLS
#undef SUB
+ case Class::Count:
+ UNREACHABLE();
}
- return "Unknown";
}
const char* GetLevelName(Level log_level) {