summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-09-23 02:39:27 +0000
committerDavid Robillard <d@drobilla.net>2014-09-23 02:39:27 +0000
commit318c36808bd17f3f84f480ec8b506747f5c316c4 (patch)
tree9007233f809a70ad0f17cc657fb9b4529962abba
parent571b5861462fc8bf28569a91b31e35a3c01f1d5e (diff)
downloadsord-318c36808bd17f3f84f480ec8b506747f5c316c4.tar.gz
sord-318c36808bd17f3f84f480ec8b506747f5c316c4.tar.bz2
sord-318c36808bd17f3f84f480ec8b506747f5c316c4.zip
Fix const-violating casts.
git-svn-id: http://svn.drobilla.net/sord/trunk@306 3d64ff67-21c5-427c-a301-fe4f08042e5a
-rw-r--r--src/zix/digest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zix/digest.c b/src/zix/digest.c
index 04f48f0..7d9c035 100644
--- a/src/zix/digest.c
+++ b/src/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