From d49122e947e5f4576acb08a859134962252643cf Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 19 Sep 2015 20:18:16 +0200 Subject: add ifdef around pragmas in header files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libkeccak/mac/hmac.h | 4 ++++ src/libkeccak/state.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src') 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 } -- cgit v1.2.3-70-g09d2