Enable -Wunreachable-code
[folly.git] / folly / dynamic.cpp
index 5e656c5e2d2acb0ce461942e9a88cbeefe295335..e9a37a991207d865f1dc4a013c4b254a3c02e4ca 100644 (file)
  * limitations under the License.
  */
 
-#include <folly/Hash.h>
 #include <folly/dynamic.h>
+
+#include <folly/Assume.h>
+#include <folly/Hash.h>
 #include <folly/portability/BitsFunctexcept.h>
 
 namespace folly {
@@ -277,9 +279,8 @@ std::size_t dynamic::hash() const {
     const auto& str = getString();
     return ::folly::hash::fnv32_buf(str.data(), str.size());
   }
-  default:
-    CHECK(0); abort();
   }
+  assume_unreachable();
 }
 
 char const* dynamic::typeName(Type t) {