aboutsummaryrefslogtreecommitdiffstats
path: root/libkeccak_generalised_sum_fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libkeccak_generalised_sum_fd.c')
-rw-r--r--libkeccak_generalised_sum_fd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libkeccak_generalised_sum_fd.c b/libkeccak_generalised_sum_fd.c
index 4aa7a94..bc81451 100644
--- a/libkeccak_generalised_sum_fd.c
+++ b/libkeccak_generalised_sum_fd.c
@@ -37,7 +37,16 @@ libkeccak_generalised_sum_fd(int fd, struct libkeccak_state *restrict state, con
#if ALLOCA_LIMIT > 0
if (blksize > (size_t)ALLOCA_LIMIT)
blksize = (size_t)ALLOCA_LIMIT;
+# if defined(__clang__)
+ /* We are using a limit so it's just like declaring an array
+ * in a function, except we might use less of the stack. */
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Walloca"
+# endif
chunk = alloca(blksize);
+# if defined(__clang__)
+# pragma clang diagnostic pop
+# endif
#else
chunk = malloc(blksize);
if (!chunk)