summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-09-21 01:21:46 +0000
committerDavid Robillard <d@drobilla.net>2014-09-21 01:21:46 +0000
commitaf4abd23b6c92ec89f0a479ce3e0f74780e32095 (patch)
tree7020e54ce8768e90986489c3a10b7de71b3a11d0
parentcde056c9d35467b51fde0ffea2a703a5f0d8c527 (diff)
downloadzix-af4abd23b6c92ec89f0a479ce3e0f74780e32095.tar.gz
zix-af4abd23b6c92ec89f0a479ce3e0f74780e32095.tar.bz2
zix-af4abd23b6c92ec89f0a479ce3e0f74780e32095.zip
Fix const-violating casts.
git-svn-id: http://svn.drobilla.net/zix/trunk@81 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
-rw-r--r--zix/digest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/zix/digest.c b/zix/digest.c
index 04f48f0..7d9c035 100644
--- a/zix/digest.c
+++ b/zix/digest.c
@@ -1,5 +1,5 @@
/*
- Copyright 2012 David Robillard <http://drobilla.net>
+ Copyright 2012-2014 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -37,15 +37,15 @@ zix_digest_add(uint32_t hash, const void* const buf, const size_t len)
#ifdef __SSE4_2__
// SSE 4.2 CRC32
for (size_t i = 0; i < (len / sizeof(uint32_t)); ++i) {
- hash = _mm_crc32_u32(hash, *(uint32_t*)str);
+ hash = _mm_crc32_u32(hash, *(const uint32_t*)str);
str += sizeof(uint32_t);
}
if (len & sizeof(uint16_t)) {
- hash = _mm_crc32_u16(hash, *(uint16_t*)str);
+ hash = _mm_crc32_u16(hash, *(const uint16_t*)str);
str += sizeof(uint16_t);
}
if (len & sizeof(uint8_t)) {
- hash = _mm_crc32_u8(hash, *(uint8_t*)str);
+ hash = _mm_crc32_u8(hash, *(const uint8_t*)str);
}
#else
// Classic DJB hash