aboutsummaryrefslogtreecommitdiffstats
path: root/libkeccak_generalised_sum_fd.c
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 /libkeccak_generalised_sum_fd.c
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 '')
-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)