eina bech - hash - warn - fix type for hash func to have proper types

wrap cityhash with proepr typed hash gen func. fix warning
This commit is contained in:
Carsten Haitzler 2018-11-06 17:18:42 +00:00
parent 0a2c3557cb
commit ea6edad4fb
1 changed files with 7 additions and 1 deletions

View File

@ -42,6 +42,12 @@
// Hash function for a byte array.
uint64_t CityHash64(const char *buf, size_t len);
static int
city_hash(const char *buf, int len)
{
return (int)CityHash64(buf, len);
}
static unsigned int
_eina_string_key_length(const char *key)
{
@ -200,7 +206,7 @@ eina_bench_lookup_cityhash(int request)
hash = eina_hash_new(EINA_KEY_LENGTH(_eina_string_key_length),
EINA_KEY_CMP(_eina_string_key_cmp),
EINA_KEY_HASH(CityHash64),
EINA_KEY_HASH(city_hash),
free,
8);