shared: fix compilation on 32-bit archictectures

shared/nm-utils/nm-hash-utils.c:110:3: error: right shift count >= width of type [-Werror]
   h = h ^ ((guint) (((uintptr_t) ptr) >> 32)) ^ ((guint) ((uintptr_t) ptr));
   ^

Even if the branch is not reached on 32-bit architectures, the
compiler still emits a warning for the 32-bit right shift.

Fixes: ee76b0979f
This commit is contained in:
Beniamino Galvani 2017-10-26 14:54:03 +02:00
parent 095a419e70
commit ef52122469

View file

@ -107,7 +107,7 @@ nm_hash_ptr (gconstpointer ptr)
if (sizeof (ptr) <= sizeof (guint))
h = h ^ ((guint) ((uintptr_t) ptr));
else
h = h ^ ((guint) (((uintptr_t) ptr) >> 32)) ^ ((guint) ((uintptr_t) ptr));
h = h ^ ((guint) (((guint64) (uintptr_t) ptr) >> 32)) ^ ((guint) ((uintptr_t) ptr));
return h ?: 2907677551u;
}