From 9ada10b3fcca6dc9eb2441c97083270f5b5f1570 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 7 Mar 2014 13:50:13 +0800 Subject: [PATCH] core: fix warning bugs on unused vars introduced by the last commit --- MathExtras.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MathExtras.h b/MathExtras.h index 484faf41..d330b4ae 100644 --- a/MathExtras.h +++ b/MathExtras.h @@ -87,7 +87,7 @@ static inline bool isPowerOf2_32(uint32_t Value) { /// bit. Ex. CountLeadingZeros_32(0x00F000FF) == 8. /// Returns 32 if the word is zero. static inline unsigned CountLeadingZeros_32(uint32_t Value) { - unsigned Shift, Count; // result + unsigned Count; // result #if __GNUC__ >= 4 // PowerPC is defined for __builtin_clz(0) #if !defined(__ppc__) && !defined(__ppc64__) @@ -95,6 +95,7 @@ static inline unsigned CountLeadingZeros_32(uint32_t Value) { #endif Count = __builtin_clz(Value); #else + unsigned Shift; if (!Value) return 32; Count = 0; // bisection method for count leading zeros @@ -123,7 +124,7 @@ static inline unsigned CountLeadingOnes_32(uint32_t Value) { /// one bit (64 bit edition.) /// Returns 64 if the word is zero. static inline unsigned CountLeadingZeros_64(uint64_t Value) { - unsigned Shift, Count; // result + unsigned Count; // result #if __GNUC__ >= 4 // PowerPC is defined for __builtin_clzll(0) #if !defined(__ppc__) && !defined(__ppc64__) @@ -132,6 +133,7 @@ static inline unsigned CountLeadingZeros_64(uint64_t Value) { Count = __builtin_clzll(Value); #else #ifndef _MSC_VER + unsigned Shift; if (sizeof(long) == sizeof(int64_t)) { if (!Value) return 64;