aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-07-30 18:29:05 +0200
committerMattias Andrée <maandree@kth.se>2021-07-30 18:29:05 +0200
commit8af021382087293e2205eb15642346c6fdd30a59 (patch)
tree985a3f4217a55d2e6c46192d94a9ce94cee36ab2 /common.h
parentDo not divide by sizeof(char) (diff)
downloadlibkeccak-8af021382087293e2205eb15642346c6fdd30a59.tar.gz
libkeccak-8af021382087293e2205eb15642346c6fdd30a59.tar.bz2
libkeccak-8af021382087293e2205eb15642346c6fdd30a59.tar.xz
Fix clang warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r--common.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/common.h b/common.h
index 4953da2..c573719 100644
--- a/common.h
+++ b/common.h
@@ -44,9 +44,18 @@
#ifdef NEED_EXPLICIT_BZERO
static void *(*volatile my_explicit_memset)(void *, int, size_t) = memset;
-static __attribute__((__optimize__("-O0"))) void
+
+# if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wunknown-attributes"
+# endif
+__attribute__((__optimize__("-O0")))
+static void
my_explicit_bzero(void *ptr, size_t size)
{
(*my_explicit_memset)(ptr, 0, size);
}
+# if defined(__clang__)
+# pragma clang diagnostic pop
+# endif
#endif