Skip to content

Commit

Permalink
in hash init code preserve constness
Browse files Browse the repository at this point in the history
This causes warnings in some our builds as can be seen in some
smoke reports:

  zaphod32_hash.h:185:17: warning: cast discards '__attribute__((const))'
  qualifier from pointer target type [-Wcast-qual]
  • Loading branch information
demerphq committed Sep 13, 2017
1 parent 45908e4 commit 20e4c2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sbox32_hash.h
Expand Up @@ -1421,7 +1421,7 @@ SBOX32_STATIC_INLINE void sbox32_seed_state96 (
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);
Expand Down
2 changes: 1 addition & 1 deletion stadtx_hash.h
Expand Up @@ -118,7 +118,7 @@ STADTX_STATIC_INLINE void stadtx_seed_state (
const U8 *seed_ch,
U8 *state_ch
) {
U64 *seed= (U64 *)seed_ch;
const U64 *seed= (const U64 *)seed_ch;
U64 *state= (U64 *)state_ch;
/* first we apply two masks to each word of the seed, this means that
* a) at least one of state[0] and state[2] is nonzero,
Expand Down
2 changes: 1 addition & 1 deletion zaphod32_hash.h
Expand Up @@ -134,7 +134,7 @@ void zaphod32_seed_state (
const U8 *seed_ch,
U8 *state_ch
) {
U32 *seed= (U32 *)seed_ch;
const U32 *seed= (const U32 *)seed_ch;
U32 *state= (U32 *)state_ch;

/* hex expansion of pi, skipping first two digits. pi= 3.2[43f6...]*/
Expand Down

0 comments on commit 20e4c2e

Please sign in to comment.