diff --git a/indexer/ftypes_matcher.hpp b/indexer/ftypes_matcher.hpp index cdf8ddef67..046c71ff14 100644 --- a/indexer/ftypes_matcher.hpp +++ b/indexer/ftypes_matcher.hpp @@ -372,7 +372,7 @@ public: class IsHotelChecker : public BaseChecker { public: - enum class Type + enum class Type : uint8_t { Hotel, Apartment, @@ -388,7 +388,7 @@ public: using UnderlyingType = std::underlying_type_t; - static_assert(base::Underlying(Type::Count) <= CHAR_BIT * sizeof(unsigned), + static_assert(base::Underlying(Type::Count) <= std::numeric_limits::digits, "Too many types of hotels"); static char const * GetHotelTypeTag(Type type); diff --git a/platform/platform.hpp b/platform/platform.hpp index e5f076ae8a..c13ee0acf6 100644 --- a/platform/platform.hpp +++ b/platform/platform.hpp @@ -315,6 +315,7 @@ public: case Thread::Gui: return m_guiThread->Push(std::forward(task)); case Thread::Background: return m_backgroundThread->Push(std::forward(task)); } + UNREACHABLE(); } template @@ -332,6 +333,7 @@ public: case Thread::Background: return m_backgroundThread->PushDelayed(delay, std::forward(task)); } + UNREACHABLE(); } void CancelTask(Thread thread, base::TaskLoop::TaskId id);