From 318c36808bd17f3f84f480ec8b506747f5c316c4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 23 Sep 2014 02:39:27 +0000 Subject: Fix const-violating casts. git-svn-id: http://svn.drobilla.net/sord/trunk@306 3d64ff67-21c5-427c-a301-fe4f08042e5a --- src/zix/digest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/zix') 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 + Copyright 2012-2014 David Robillard 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 -- cgit v1.2.1