mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-04-08 14:42:16 +02:00
(hash): Define magic constant as unsigned long long and then cast it to the
right type. Avoids compiler warnings when cross-compiling from a 32-bit platform. (Logical change 1.214)
This commit is contained in:
parent
a2cd0592ca
commit
1218cf85e3
1 changed files with 2 additions and 1 deletions
|
@ -60,7 +60,8 @@ static __thread struct ia64_script_cache ia64_per_thread_cache =
|
||||||
static inline unw_hash_index_t
|
static inline unw_hash_index_t
|
||||||
hash (unw_word_t ip)
|
hash (unw_word_t ip)
|
||||||
{
|
{
|
||||||
# define magic 0x9e3779b97f4a7c16 /* based on (sqrt(5)/2-1)*2^64 */
|
/* based on (sqrt(5)/2-1)*2^64 */
|
||||||
|
# define magic ((unw_word_t) 0x9e3779b97f4a7c16ULL)
|
||||||
|
|
||||||
return (ip >> 4) * magic >> (64 - IA64_LOG_UNW_HASH_SIZE);
|
return (ip >> 4) * magic >> (64 - IA64_LOG_UNW_HASH_SIZE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue