diff --git a/CMakeLists.txt b/CMakeLists.txt index a7da6b251..ca8dc79de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,6 +258,9 @@ elseif(MSVC) # warning C4548: expression before comma has no effect; expected expression with side-effect /wd4548 + # warning C5051: attribute 'fallthrough' requires at least '/std:c++17' + /wd5051 + # Make sure WinDef.h does not define min and max macros which # will conflict with std::min() and std::max(). /DNOMINMAX diff --git a/opensubdiv/bfr/hash.cpp b/opensubdiv/bfr/hash.cpp index 6dd874058..3ae573478 100644 --- a/opensubdiv/bfr/hash.cpp +++ b/opensubdiv/bfr/hash.cpp @@ -388,47 +388,47 @@ void SpookyHash::Short( { case 15: d += ((uint64)u.p8[14]) << 48; - // FALLTHRU + [[fallthrough]]; case 14: d += ((uint64)u.p8[13]) << 40; - // FALLTHRU + [[fallthrough]]; case 13: d += ((uint64)u.p8[12]) << 32; - // FALLTHRU + [[fallthrough]]; case 12: d += u.p32[2]; c += u.p64[0]; break; case 11: d += ((uint64)u.p8[10]) << 16; - // FALLTHRU + [[fallthrough]]; case 10: d += ((uint64)u.p8[9]) << 8; - // FALLTHRU + [[fallthrough]]; case 9: d += (uint64)u.p8[8]; - // FALLTHRU + [[fallthrough]]; case 8: c += u.p64[0]; break; case 7: c += ((uint64)u.p8[6]) << 48; - // FALLTHRU + [[fallthrough]]; case 6: c += ((uint64)u.p8[5]) << 40; - // FALLTHRU + [[fallthrough]]; case 5: c += ((uint64)u.p8[4]) << 32; - // FALLTHRU + [[fallthrough]]; case 4: c += u.p32[0]; break; case 3: c += ((uint64)u.p8[2]) << 16; - // FALLTHRU + [[fallthrough]]; case 2: c += ((uint64)u.p8[1]) << 8; - // FALLTHRU + [[fallthrough]]; case 1: c += (uint64)u.p8[0]; break;