mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-30 21:35:41 +00:00
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:
parent
095a419e70
commit
ef52122469
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue