aboutsummaryrefslogtreecommitdiff
path: root/src/siphash.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-07-19 17:44:49 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-07-19 17:44:49 +0200
commit027333e56aeea20c486702ecfb9571ca45fd14f6 (patch)
treef05033ff39575abf4010392920caa36b58b3b734 /src/siphash.c
parent43d34d2473917521376f7d56126779f941205105 (diff)
downloadxK-027333e56aeea20c486702ecfb9571ca45fd14f6.tar.gz
xK-027333e56aeea20c486702ecfb9571ca45fd14f6.tar.xz
xK-027333e56aeea20c486702ecfb9571ca45fd14f6.zip
Fix some compiler warnings
`-Weverything' seems to have found a few problems. Also enabled clang sanitizers by default.
Diffstat (limited to 'src/siphash.c')
-rw-r--r--src/siphash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/siphash.c b/src/siphash.c
index 842af7d..7a5c8d4 100644
--- a/src/siphash.c
+++ b/src/siphash.c
@@ -52,7 +52,8 @@ siphash (const unsigned char key[16], const unsigned char *m, size_t len)
v1 ^= v2; v3 ^= v0; \
v2 = ROTL64(v2,32);
- for (i = 0, blocks = (len & ~7); i < blocks; i += 8) {
+ for (i = 0, blocks = (len & ~(size_t) 7); i < blocks; i += 8)
+ {
mi = u8to64_le (m + i);
v3 ^= mi;
COMPRESS