From 24c0fe574f38fc9d80a97517fa9a2701cd7dba3a Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Fri, 31 Aug 2012 16:13:18 -0700 Subject: [PATCH] Add type casts to avoid warnings On some build platforms, the assignments in the hash string fn were generating warning messages. This clears those up. --- khash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/khash.h b/khash.h index afa2e16..0333510 100644 --- a/khash.h +++ b/khash.h @@ -378,8 +378,8 @@ static const double __ac_HASH_UPPER = 0.77; */ static kh_inline khint_t __ac_X31_hash_string(const char *s) { - khint_t h = *s; - if (h) for (++s ; *s; ++s) h = (h << 5) - h + *s; + khint_t h = (khint_t)*s; + if (h) for (++s ; *s; ++s) h = (h << 5) - h + (khint_t)*s; return h; } /*! @function -- 2.47.3