# HG changeset patch # User Eli Zaretskii # Date 1168724788 0 # Node ID 6a5ce97ea40de2f95b309c8e1c11f4ab8a3e792a # Parent 9e5c071deb9f17658be26ac1202a47303454e3e8 (maybe_resize_hash_table): Copy new size of hash table into EMACS_INT to avoid GCC warnings. diff -r 9e5c071deb9f -r 6a5ce97ea40d src/fns.c --- a/src/fns.c Sat Jan 13 21:46:02 2007 +0000 +++ b/src/fns.c Sat Jan 13 21:46:28 2007 +0000 @@ -4668,6 +4668,7 @@ { int old_size = HASH_TABLE_SIZE (h); int i, new_size, index_size; + EMACS_INT nsize; if (INTEGERP (h->rehash_size)) new_size = old_size + XFASTINT (h->rehash_size); @@ -4677,7 +4678,10 @@ index_size = next_almost_prime ((int) (new_size / XFLOATINT (h->rehash_threshold))); - if (max (index_size, 2 * new_size) > MOST_POSITIVE_FIXNUM) + /* Assignment to EMACS_INT stops GCC whining about limited range + of data type. */ + nsize = max (index_size, 2 * new_size); + if (nsize > MOST_POSITIVE_FIXNUM) error ("Hash table too large to resize"); h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil);