--- a/base/system/sys_info_posix.cc
+++ b/base/system/sys_info_posix.cc
@@ -62,10 +62,10 @@
   if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0)
     return false;
 
-  switch (stats.f_type) {
+  switch (static_cast<uintmax_t>(stats.f_type)) {
     case TMPFS_MAGIC:
-    case static_cast<int>(HUGETLBFS_MAGIC):
-    case static_cast<int>(RAMFS_MAGIC):
+    case HUGETLBFS_MAGIC:
+    case RAMFS_MAGIC:
       return true;
   }
   return false;
