Skip to content
Browse files

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.
  • Loading branch information...
1 parent bfb7a74 commit 24c0fe574f38fc9d80a97517fa9a2701cd7dba3a @arrbee arrbee committed Aug 31, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 khash.h
View
4 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

0 comments on commit 24c0fe5

Please sign in to comment.
Something went wrong with that request. Please try again.