From 55fe524775b47f16589e3fc8f28ccffe5e88a048 Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Wed, 16 Aug 2006 15:43:49 -0600 Subject: [PATCH] Cleanup the hash() function copied from ia64 Fixes the compiler warning on x86-32. Signed-off-by: Arun Sharma --- src/dwarf/Gparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dwarf/Gparser.c b/src/dwarf/Gparser.c index 300150fd..aa87d618 100644 --- a/src/dwarf/Gparser.c +++ b/src/dwarf/Gparser.c @@ -533,7 +533,7 @@ hash (unw_word_t ip) /* based on (sqrt(5)/2-1)*2^64 */ # define magic ((unw_word_t) 0x9e3779b97f4a7c16ULL) - return (ip >> 4) * magic >> (64 - DWARF_LOG_UNW_HASH_SIZE); + return ip * magic >> ((sizeof(unw_word_t) * 8) - DWARF_LOG_UNW_HASH_SIZE); } static inline long