mirror of
https://github.com/facebook/zstd.git
synced 2025-10-08 00:04:02 -04:00
Fix a C89 error in msvc
Variables (r) must be declared at the beginning of a code block. This causes msvc2012 to fail to compile 64-bit build.
This commit is contained in:
parent
01976ce4cd
commit
cc22042da0
@ -881,8 +881,11 @@ typedef U64 ZSTD_VecMask; /* Clarifies when we are interacting with a U64 repr
|
||||
static U32 ZSTD_VecMask_next(ZSTD_VecMask val) {
|
||||
assert(val != 0);
|
||||
# if defined(_MSC_VER) && defined(_WIN64)
|
||||
unsigned long r=0;
|
||||
return _BitScanForward64(&r, val) ? (U32)r : 0; /* _BitScanForward64 not defined outside of x86/64 */
|
||||
{
|
||||
unsigned long r = 0;
|
||||
/* _BitScanForward64 is not defined outside of x64 */
|
||||
return _BitScanForward64(&r, val) ? (U32)r : 0;
|
||||
}
|
||||
# elif (defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))))
|
||||
if (sizeof(size_t) == 4) {
|
||||
U32 mostSignificantWord = (U32)(val >> 32);
|
||||
|
Loading…
x
Reference in New Issue
Block a user