aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks
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 /src/benchmarks
parenteina vpath - warning - remove unused variable (diff)
downloadefl-ea6edad4fba3b68d2cf07863c2528690ac55017e.tar.gz
eina bech - hash - warn - fix type for hash func to have proper types
wrap cityhash with proepr typed hash gen func. fix warning
Diffstat (limited to 'src/benchmarks')
-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 33d1bba36a..96748183e0 100644
--- a/src/benchmarks/eina/eina_bench_hash.c
+++ b/src/benchmarks/eina/eina_bench_hash.c
@@ -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);