aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libkeccak.h7
-rw-r--r--libkeccak_hmac_unmarshal.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/libkeccak.h b/libkeccak.h
index f24e58e..745dd2c 100644
--- a/libkeccak.h
+++ b/libkeccak.h
@@ -999,7 +999,14 @@ libkeccak_hmac_marshal(const struct libkeccak_hmac_state *restrict state, void *
size_t written = libkeccak_state_marshal(&state->sponge, data);
if (data) {
data += written;
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wcast-align"
+#endif
*(size_t *)data = state->key_length;
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
data += sizeof(size_t);
memcpy(data, state->key_opad, (state->key_length + 7) >> 3);
data += (state->key_length + 7) >> 3;
diff --git a/libkeccak_hmac_unmarshal.c b/libkeccak_hmac_unmarshal.c
index bc76275..d4fb647 100644
--- a/libkeccak_hmac_unmarshal.c
+++ b/libkeccak_hmac_unmarshal.c
@@ -1,6 +1,10 @@
/* See LICENSE file for copyright and license details. */
#include "common.h"
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wcast-align"
+#endif
+
/**
* Unmarshal a `struct libkeccak_hmac_state` from a buffer