Don't initialize the first parameter of _BitScanForward* functions

Like the document example, no need to initialize `r` to 0.
https://docs.microsoft.com/en-us/cpp/intrinsics/bitscanforward-bitscanforward64
This commit is contained in:
Ma Lin
2021-09-25 16:36:53 +08:00
parent 95f492ea17
commit e5ba858270
5 changed files with 10 additions and 12 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ static U32 FSE_ctz(U32 val)
assert(val != 0);
{
# if defined(_MSC_VER) /* Visual */
unsigned long r=0;
unsigned long r;
return _BitScanForward(&r, val) ? (unsigned)r : 0;
# elif defined(__GNUC__) && (__GNUC__ >= 3) /* GCC Intrinsic */
return __builtin_ctz(val);