From a8bb192fa4158413495a64a146a1ca0cd8b9df07 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 31 Jul 2019 09:11:34 -0700 Subject: Fixed -Wshorten-64-to-32 --- upb/table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'upb/table.c') 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)) { -- cgit v1.2.3