]> Savannah Git Hosting - gnulib.git/commit
hash: add casts-to-float to avoid clang-10 warnings
authorJim Meyering <meyering@fb.com>
Wed, 30 Dec 2020 03:34:55 +0000 (19:34 -0800)
committerJim Meyering <meyering@fb.com>
Wed, 30 Dec 2020 03:36:50 +0000 (19:36 -0800)
commit7fa203018d02d8f2b71a6be1240c3963a63cab1c
tree49896c10960f3c06436bb12eea87849321f32c21
parent649e713c1e5452204253cb1029ea22c1b6effa2e
hash: add casts-to-float to avoid clang-10 warnings

* lib/hash.c (compute_bucket_size): Cast SIZE_MAX to float
to avoid this warning from clang-10 (for use in grep):
  hash.c:501:11: error: implicit conversion from 'unsigned long' \
    to 'float' changes value from 18446744073709551615 to \
    18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
  if (SIZE_MAX <= new_candidate)
(hash_insert_if_absent): Likewise.
ChangeLog
lib/hash.c