mirror of
https://github.com/facebook/zstd.git
synced 2025-11-29 00:04:37 -05:00
Fixed : minor warnings under Visual 32 bits
This commit is contained in:
parent
a09347235f
commit
fb81417323
@ -195,9 +195,9 @@ static void FSE_writeLE64(void* memPtr, U64 val64)
|
|||||||
static size_t FSE_readLEST(const void* memPtr)
|
static size_t FSE_readLEST(const void* memPtr)
|
||||||
{
|
{
|
||||||
if (sizeof(size_t)==4)
|
if (sizeof(size_t)==4)
|
||||||
return FSE_readLE32(memPtr);
|
return (size_t)FSE_readLE32(memPtr);
|
||||||
else
|
else
|
||||||
return FSE_readLE64(memPtr);
|
return (size_t)FSE_readLE64(memPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FSE_writeLEST(void* memPtr, size_t val)
|
static void FSE_writeLEST(void* memPtr, size_t val)
|
||||||
|
|||||||
@ -382,7 +382,8 @@ static unsigned ZSTD_NbCommonBytes (register size_t val)
|
|||||||
return (__builtin_clzll(val) >> 3);
|
return (__builtin_clzll(val) >> 3);
|
||||||
# else
|
# else
|
||||||
unsigned r;
|
unsigned r;
|
||||||
if (!(val>>32)) { r=4; } else { r=0; val>>=32; }
|
const unsigned n32 = sizeof(size_t)*4; /* calculate this way due to compiler complaining in 32-bits mode */
|
||||||
|
if (!(val>>n32)) { r=4; } else { r=0; val>>=n32; }
|
||||||
if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; }
|
if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; }
|
||||||
r += (!val);
|
r += (!val);
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user