From 1829598c6e4e29da89d73624e461aaffd983fde3 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 23 Jun 2019 17:04:58 -0700 Subject: Do not cast away constness Fix most compiler warnings caused by building Perl extensions with -Wcast-qual. This is realized by changing the type of multiple T * arguments into const T * and by changing a few (T *) casts into (const T *). --- sbox32_hash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbox32_hash.h') diff --git a/sbox32_hash.h b/sbox32_hash.h index 04078ae809..594431ba0d 100644 --- a/sbox32_hash.h +++ b/sbox32_hash.h @@ -1409,7 +1409,7 @@ SBOX32_STATIC_INLINE void sbox32_seed_state128 ( const U8 *seed_ch, U8 *state_ch ) { - U32 *seed= (U32 *)seed_ch; + const U32 *seed= (const U32 *)seed_ch; U32 *state= (U32 *)state_ch; U32 *state_cursor = state + 1; U32 *sbox32_end = state + 1 + (256 * SBOX32_MAX_LEN); @@ -1458,7 +1458,7 @@ SBOX32_STATIC_INLINE U32 sbox32_hash_with_state( const U8 *key, const STRLEN key_len ) { - U32 *state= (U32 *)state_ch; + const U32 *state= (const U32 *)state_ch; U32 hash = *state; switch (key_len) { default: return zaphod32_hash_with_state(state_ch, key, key_len); -- cgit v1.2.1