diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libkeccak/mac/hmac.h | 4 | ||||
-rw-r--r-- | src/libkeccak/state.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/libkeccak/mac/hmac.h b/src/libkeccak/mac/hmac.h index fe6f992..2b4b264 100644 --- a/src/libkeccak/mac/hmac.h +++ b/src/libkeccak/mac/hmac.h @@ -232,11 +232,15 @@ void libkeccak_hmac_fast_free(libkeccak_hmac_state_t* restrict state) static inline __attribute__((unused, optimize("-O0"))) void libkeccak_hmac_free(volatile libkeccak_hmac_state_t* restrict state) { +#ifdef __GNUC__ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wcast-qual" +#endif libkeccak_hmac_destroy(state); free((libkeccak_hmac_state_t*)state); +#ifdef __GNUC__ # pragma GCC diagnostic pop +#endif } diff --git a/src/libkeccak/state.h b/src/libkeccak/state.h index 44f36ac..4c2c1d8 100644 --- a/src/libkeccak/state.h +++ b/src/libkeccak/state.h @@ -219,11 +219,15 @@ void libkeccak_state_fast_free(libkeccak_state_t* restrict state) static inline __attribute__((unused, optimize("-O0"))) void libkeccak_state_free(volatile libkeccak_state_t* restrict state) { +#ifdef __GNUC__ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wcast-qual" +#endif libkeccak_state_destroy(state); free((libkeccak_state_t*)state); +#ifdef __GNUC__ # pragma GCC diagnostic pop +#endif } |