X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fwimlib%2Fbitops.h;h=191e95a10f7d537eb215cddfa90914adbe94f334;hb=c5e4bd4c75bf1f1e8c75c460853340a15917d55c;hp=2e7a948fd9b91bb9d4065a49a23252ff77d1dc90;hpb=0ecb0529b5fcacc1abafa1f3f02a40c44783ada8;p=wimlib diff --git a/include/wimlib/bitops.h b/include/wimlib/bitops.h index 2e7a948f..191e95a1 100644 --- a/include/wimlib/bitops.h +++ b/include/wimlib/bitops.h @@ -44,7 +44,7 @@ fls64(u64 v) static inline unsigned flsw(machine_word_t v) { - BUILD_BUG_ON(WORDSIZE != 4 && WORDSIZE != 8); + STATIC_ASSERT(WORDSIZE == 4 || WORDSIZE == 8); if (WORDSIZE == 4) return fls32(v); else @@ -82,7 +82,7 @@ ffs64(u64 v) static inline unsigned ffsw(machine_word_t v) { - BUILD_BUG_ON(WORDSIZE != 4 && WORDSIZE != 8); + STATIC_ASSERT(WORDSIZE == 4 || WORDSIZE == 8); if (WORDSIZE == 4) return ffs32(v); else