From af4abd23b6c92ec89f0a479ce3e0f74780e32095 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Sep 2014 01:21:46 +0000 Subject: Fix const-violating casts. git-svn-id: http://svn.drobilla.net/zix/trunk@81 df6676b4-ccc9-40e5-b5d6-7c4628a128e3 --- zix/digest.c | 8 ++++---- 1 file 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 + 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