aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-19 20:18:16 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-19 20:18:25 +0200
commitd49122e947e5f4576acb08a859134962252643cf (patch)
treea980ed6ef8b900955fc63165c58eaa3eb41ed139
parentdo not use builtin functions in header files (diff)
downloadlibkeccak-d49122e947e5f4576acb08a859134962252643cf.tar.gz
libkeccak-d49122e947e5f4576acb08a859134962252643cf.tar.bz2
libkeccak-d49122e947e5f4576acb08a859134962252643cf.tar.xz
add ifdef around pragmas in header files
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/libkeccak/mac/hmac.h4
-rw-r--r--src/libkeccak/state.h4
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
}