소스 검색

common/logging: Silence no return value warnings

ReinUsesLisp 6 년 전
부모
커밋
2ac834c722
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      src/common/logging/backend.cpp

+ 6 - 2
src/common/logging/backend.cpp

@@ -272,8 +272,10 @@ const char* GetLogClassName(Class log_class) {
 #undef CLS
 #undef SUB
     case Class::Count:
-        UNREACHABLE();
+        break;
     }
+    UNREACHABLE();
+    return "Invalid";
 }
 
 const char* GetLevelName(Level log_level) {
@@ -288,9 +290,11 @@ const char* GetLevelName(Level log_level) {
         LVL(Error);
         LVL(Critical);
     case Level::Count:
-        UNREACHABLE();
+        break;
     }
 #undef LVL
+    UNREACHABLE();
+    return "Invalid";
 }
 
 void SetGlobalFilter(const Filter& filter) {