diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 79a2f52d6c0..7a251ecaca1 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -102,14 +102,14 @@ static zend_always_inline uint32_t zend_hash_check_size(uint32_t nSize) #if defined(ZEND_WIN32) if (BitScanReverse(&index, nSize - 1)) { - return 0x2 << ((31 - index) ^ 0x1f); + return 0x2u << ((31 - index) ^ 0x1f); } else { /* nSize is ensured to be in the valid range, fall back to it rather than using an undefined bis scan result. */ return nSize; } #elif (defined(__GNUC__) || __has_builtin(__builtin_clz)) && defined(PHP_HAVE_BUILTIN_CLZ) - return 0x2 << (__builtin_clz(nSize - 1) ^ 0x1f); + return 0x2u << (__builtin_clz(nSize - 1) ^ 0x1f); #else nSize -= 1; nSize |= (nSize >> 1);