File ltrace-ppc64le_git18.patch of Package ltrace
dict.c part of
commit a2c270e86913ab93c41cdd61055d7c2b71b10fa1
Author: Petr Machata <pmachata@redhat.com>
Date: Mon Mar 11 21:19:13 2013 -0400
Fix compilation
- GCC points out that the constant in dict.c that we use
for computing string hashes is not implicitly unsigned.
- When building without unwinding support, we can't access
ifdef'd-out fields. I remember having writted it this way
to increase exposure of the error handling code for syntax
checks, but it can't work.
diff --git a/dict.c b/dict.c
index c3a4e81..a06e570 100644
--- a/dict.c
+++ b/dict.c
@@ -464,7 +464,7 @@ dict_each(struct dict *dict, void *start_after,
size_t
dict_hash_int(const int *key)
{
- return (size_t)(*key * 2654435761);
+ return (size_t)(*key * 2654435761U);
}
int