summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2011-05-22 17:49:44 (GMT)
committerJason Evans <jasone@canonware.com>2011-05-22 17:49:44 (GMT)
commitf0b22cf932b6fa7be2027a1058802fab0d6e25c6 (patch)
treee9d10c09d193bd04be43c00609629b6eb36a2eff
parent408ade654580ce2456b990cc7760f8554805111d (diff)
downloadjemalloc-f0b22cf932b6fa7be2027a1058802fab0d6e25c6.zip
jemalloc-f0b22cf932b6fa7be2027a1058802fab0d6e25c6.tar.gz
jemalloc-f0b22cf932b6fa7be2027a1058802fab0d6e25c6.tar.bz2
Use LLU suffix for all 64-bit constants.
Add the LLU suffix for all 0x... 64-bit constants. Reported by Jakob Blomer.
-rw-r--r--include/jemalloc/internal/hash.h2
-rw-r--r--src/ckh.c2
-rw-r--r--src/prof.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/include/jemalloc/internal/hash.h b/include/jemalloc/internal/hash.h
index 93905bf..8a46ce3 100644
--- a/include/jemalloc/internal/hash.h
+++ b/include/jemalloc/internal/hash.h
@@ -26,7 +26,7 @@ uint64_t hash(const void *key, size_t len, uint64_t seed);
JEMALLOC_INLINE uint64_t
hash(const void *key, size_t len, uint64_t seed)
{
- const uint64_t m = 0xc6a4a7935bd1e995;
+ const uint64_t m = 0xc6a4a7935bd1e995LLU;
const int r = 47;
uint64_t h = seed ^ (len * m);
const uint64_t *data = (const uint64_t *)key;
diff --git a/src/ckh.c b/src/ckh.c
index 143b5b5..43fcc25 100644
--- a/src/ckh.c
+++ b/src/ckh.c
@@ -556,7 +556,7 @@ ckh_string_hash(const void *key, unsigned minbits, size_t *hash1, size_t *hash2)
} else {
ret1 = h;
ret2 = hash(key, strlen((const char *)key),
- 0x8432a476666bbc13U);
+ 0x8432a476666bbc13LLU);
}
*hash1 = ret1;
diff --git a/src/prof.c b/src/prof.c
index 8370042..6549375 100644
--- a/src/prof.c
+++ b/src/prof.c
@@ -1072,7 +1072,7 @@ prof_bt_hash(const void *key, unsigned minbits, size_t *hash1, size_t *hash2)
} else {
ret1 = h;
ret2 = hash(bt->vec, bt->len * sizeof(void *),
- 0x8432a476666bbc13U);
+ 0x8432a476666bbc13LLU);
}
*hash1 = ret1;