summaryrefslogtreecommitdiff
path: root/upb/table.c
diff options
context:
space:
mode:
authorNicolas Noble <nicolasnoble@users.noreply.github.com>2019-07-31 10:05:01 -0700
committerGitHub <noreply@github.com>2019-07-31 10:05:01 -0700
commit94d74ce700dbdacdcec23513a91b2127e6d7df42 (patch)
treea7694b5dc1dd4ac157a23d3f029c4756569af467 /upb/table.c
parent588128ccce25625f9e630e80142e244637517ef7 (diff)
parenta8bb192fa4158413495a64a146a1ca0cd8b9df07 (diff)
Merge pull request #198 from veblush/shorten
Fixed -Wshorten-64-to-32
Diffstat (limited to 'upb/table.c')
-rw-r--r--upb/table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/upb/table.c b/upb/table.c
index 429861e..9f8c59f 100644
--- a/upb/table.c
+++ b/upb/table.c
@@ -646,7 +646,7 @@ void upb_inttable_compact2(upb_inttable *t, upb_alloc *a) {
size_t arr_size = max[size_lg2] + 1; /* +1 so arr[max] will fit. */
size_t hash_count = upb_inttable_count(t) - arr_count;
size_t hash_size = hash_count ? (hash_count / MAX_LOAD) + 1 : 0;
- size_t hashsize_lg2 = log2ceil(hash_size);
+ int hashsize_lg2 = log2ceil(hash_size);
upb_inttable_sizedinit(&new_t, t->t.ctype, arr_size, hashsize_lg2, a);
upb_inttable_begin(&i, t);
@@ -798,7 +798,7 @@ uint32_t MurmurHash2(const void * key, size_t len, uint32_t seed) {
const uint32_t m = 0x5bd1e995;
const int32_t r = 24;
const uint8_t * data = (const uint8_t *)key;
- uint32_t h = seed ^ len;
+ uint32_t h = (uint32_t)(seed ^ len);
uint8_t align = (uintptr_t)data & 3;
if(align && (len >= 4)) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback