diff --git a/src/hash.c b/src/hash.c
index 4116ca0b..bc74c522 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -283,10 +283,10 @@ hash_table_new (int items,
 
   /* Calculate the size that ensures that the table will store at
      least ITEMS keys without the need to resize.  */
-  size = 1 + items / HASH_MAX_FULLNESS;
+  size = (int) (1 + items / HASH_MAX_FULLNESS);
   size = prime_size (size, &ht->prime_offset);
   ht->size = size;
-  ht->resize_threshold = size * HASH_MAX_FULLNESS;
+  ht->resize_threshold = (int) (size * HASH_MAX_FULLNESS);
   /*assert (ht->resize_threshold >= items);*/
 
   ht->cells = xnew_array (struct cell, ht->size);
@@ -394,7 +394,7 @@ grow_hash_table (struct hash_table *ht)
 #endif
 
   ht->size = newsize;
-  ht->resize_threshold = newsize * HASH_MAX_FULLNESS;
+  ht->resize_threshold = (int) (newsize * HASH_MAX_FULLNESS);
 
   cells = xnew_array (struct cell, newsize);
   memset (cells, INVALID_PTR_CHAR, newsize * sizeof (struct cell));