diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-06-23 17:04:58 -0700 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2022-12-13 12:59:04 +0000 |
commit | 1829598c6e4e29da89d73624e461aaffd983fde3 (patch) | |
tree | 8cf466ee9f1029ecdfdf12bffb15b3e753f90d50 /sbox32_hash.h | |
parent | 84fa78b4832e64bc0dfc0ea25843d48b4d9782c7 (diff) | |
download | perl-1829598c6e4e29da89d73624e461aaffd983fde3.tar.gz |
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 *).
Diffstat (limited to 'sbox32_hash.h')
-rw-r--r-- | sbox32_hash.h | 4 |
1 files changed, 2 insertions, 2 deletions
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); |