core: fix warning bugs on unused vars introduced by the last commit
This commit is contained in:
parent
0adacf18b1
commit
9ada10b3fc
|
@ -87,7 +87,7 @@ static inline bool isPowerOf2_32(uint32_t Value) {
|
||||||
/// bit. Ex. CountLeadingZeros_32(0x00F000FF) == 8.
|
/// bit. Ex. CountLeadingZeros_32(0x00F000FF) == 8.
|
||||||
/// Returns 32 if the word is zero.
|
/// Returns 32 if the word is zero.
|
||||||
static inline unsigned CountLeadingZeros_32(uint32_t Value) {
|
static inline unsigned CountLeadingZeros_32(uint32_t Value) {
|
||||||
unsigned Shift, Count; // result
|
unsigned Count; // result
|
||||||
#if __GNUC__ >= 4
|
#if __GNUC__ >= 4
|
||||||
// PowerPC is defined for __builtin_clz(0)
|
// PowerPC is defined for __builtin_clz(0)
|
||||||
#if !defined(__ppc__) && !defined(__ppc64__)
|
#if !defined(__ppc__) && !defined(__ppc64__)
|
||||||
|
@ -95,6 +95,7 @@ static inline unsigned CountLeadingZeros_32(uint32_t Value) {
|
||||||
#endif
|
#endif
|
||||||
Count = __builtin_clz(Value);
|
Count = __builtin_clz(Value);
|
||||||
#else
|
#else
|
||||||
|
unsigned Shift;
|
||||||
if (!Value) return 32;
|
if (!Value) return 32;
|
||||||
Count = 0;
|
Count = 0;
|
||||||
// bisection method for count leading zeros
|
// bisection method for count leading zeros
|
||||||
|
@ -123,7 +124,7 @@ static inline unsigned CountLeadingOnes_32(uint32_t Value) {
|
||||||
/// one bit (64 bit edition.)
|
/// one bit (64 bit edition.)
|
||||||
/// Returns 64 if the word is zero.
|
/// Returns 64 if the word is zero.
|
||||||
static inline unsigned CountLeadingZeros_64(uint64_t Value) {
|
static inline unsigned CountLeadingZeros_64(uint64_t Value) {
|
||||||
unsigned Shift, Count; // result
|
unsigned Count; // result
|
||||||
#if __GNUC__ >= 4
|
#if __GNUC__ >= 4
|
||||||
// PowerPC is defined for __builtin_clzll(0)
|
// PowerPC is defined for __builtin_clzll(0)
|
||||||
#if !defined(__ppc__) && !defined(__ppc64__)
|
#if !defined(__ppc__) && !defined(__ppc64__)
|
||||||
|
@ -132,6 +133,7 @@ static inline unsigned CountLeadingZeros_64(uint64_t Value) {
|
||||||
Count = __builtin_clzll(Value);
|
Count = __builtin_clzll(Value);
|
||||||
#else
|
#else
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
unsigned Shift;
|
||||||
if (sizeof(long) == sizeof(int64_t))
|
if (sizeof(long) == sizeof(int64_t))
|
||||||
{
|
{
|
||||||
if (!Value) return 64;
|
if (!Value) return 64;
|
||||||
|
|
Loading…
Reference in New Issue