From: Russell Belfer Date: Fri, 31 Aug 2012 23:13:18 +0000 (-0700) Subject: Add type casts to avoid warnings X-Git-Tag: spawn-final~43^2~1 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=24c0fe574f38fc9d80a97517fa9a2701cd7dba3a;p=klib.git 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. --- 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