aboutsummaryrefslogtreecommitdiffstats
path: root/libkeccak_degeneralise_spec.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_degeneralise_spec.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_degeneralise_spec.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/libkeccak_degeneralise_spec.c b/libkeccak_degeneralise_spec.c
index ad5d415..d2c4ea5 100644
--- a/libkeccak_degeneralise_spec.c
+++ b/libkeccak_degeneralise_spec.c
@@ -2,7 +2,10 @@
#include "common.h"
-#ifdef __GNUC__
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wconditional-uninitialized"
+#elif defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
@@ -50,8 +53,10 @@ libkeccak_degeneralise_spec(struct libkeccak_generalised_spec *restrict spec,
return LIBKECCAK_GENERALISED_SPEC_ERROR_WORD_TOO_LARGE;
if (have_state_size && state_size != word_size * 25)
return LIBKECCAK_GENERALISED_SPEC_ERROR_STATE_WORD_INCOHERENCY;
- else if (!have_state_size)
- spec->state_size = 1, state_size = word_size * 25;
+ else if (!have_state_size) {
+ spec->state_size = 1;
+ state_size = word_size * 25;
+ }
}
if (have_capacity) {
@@ -112,6 +117,8 @@ libkeccak_degeneralise_spec(struct libkeccak_generalised_spec *restrict spec,
#undef deft
-#ifdef __GNUC__
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#elif defined(__GNUC__)
# pragma GCC diagnostic pop
#endif