summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-06 17:18:42 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-09 11:43:58 +0000
commitea6edad4fba3b68d2cf07863c2528690ac55017e (patch)
treeaa05a9343d1529c5a0f7aab0d7e5ce4a7bc1ef52
parent0a2c3557cb146d0a038a13051081453aff0c437f (diff)
eina bech - hash - warn - fix type for hash func to have proper types
wrap cityhash with proepr typed hash gen func. fix warning
-rw-r--r--src/benchmarks/eina/eina_bench_hash.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/benchmarks/eina/eina_bench_hash.c b/src/benchmarks/eina/eina_bench_hash.c
index 33d1bba..9674818 100644
--- a/src/benchmarks/eina/eina_bench_hash.c
+++ b/src/benchmarks/eina/eina_bench_hash.c
@@ -42,6 +42,12 @@
42// Hash function for a byte array. 42// Hash function for a byte array.
43uint64_t CityHash64(const char *buf, size_t len); 43uint64_t CityHash64(const char *buf, size_t len);
44 44
45static int
46city_hash(const char *buf, int len)
47{
48 return (int)CityHash64(buf, len);
49}
50
45static unsigned int 51static unsigned int
46_eina_string_key_length(const char *key) 52_eina_string_key_length(const char *key)
47{ 53{
@@ -200,7 +206,7 @@ eina_bench_lookup_cityhash(int request)
200 206
201 hash = eina_hash_new(EINA_KEY_LENGTH(_eina_string_key_length), 207 hash = eina_hash_new(EINA_KEY_LENGTH(_eina_string_key_length),
202 EINA_KEY_CMP(_eina_string_key_cmp), 208 EINA_KEY_CMP(_eina_string_key_cmp),
203 EINA_KEY_HASH(CityHash64), 209 EINA_KEY_HASH(city_hash),
204 free, 210 free,
205 8); 211 8);
206 212