hashfunctions

generic hash functions and PRFs: Jenkins, FNV, siphash
git clone https://noulin.net/git/hashfunctions.git
Log | Files | Refs | LICENSE

commit 81b0920e62475c7c672d529e4f6fb75ef38c1e58
parent 199ebc2a35e8921c49f724b1fe82264a08b59bda
Author: Remy Noulin <loader2x@gmail.com>
Date:   Fri,  1 Jun 2018 13:47:48 +0200

cast char* to const u8* to avoid warning

hashfunctions.c | 2 +-
package.yml     | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Diffstat:
Mhashfunctions.c | 2+-
Mpackage.yml | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hashfunctions.c b/hashfunctions.c @@ -7,7 +7,7 @@ */ u32 strHashFNV1A(char *k) { u32 hash = 2166136261U; - for (const u8* ptr = k; *ptr; ptr++) { + for (const u8* ptr = (const u8*)k; *ptr; ptr++) { hash = (hash ^ *ptr) * 16777619U; } return hash; diff --git a/package.yml b/package.yml @@ -1,6 +1,6 @@ --- name: hashfunctions - version: 0.0.2 + version: 0.0.3 description: "generic hash functions and PRFs: Jenkins, FNV, siphash" bin: ./hashfunctions.c cflags: -O3 -std=gnu11 -fPIC -pipe