aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-08-31 22:09:15 +0200
committerMattias Andrée <maandree@operamail.com>2015-08-31 22:09:15 +0200
commitd45823018e8be7ca1a3f70c4de1fb12826b2a102 (patch)
tree5bffbd560a396e8f66dc642f3db3302fcda38758 /src
parentfix api bug: int_fastN_t depends on the c library, thus it must not be used in structs and prototypes (diff)
downloadlibkeccak-d45823018e8be7ca1a3f70c4de1fb12826b2a102.tar.gz
libkeccak-d45823018e8be7ca1a3f70c4de1fb12826b2a102.tar.bz2
libkeccak-d45823018e8be7ca1a3f70c4de1fb12826b2a102.tar.xz
fix warning (compiler regression?)
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/libkeccak/generalised-spec.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libkeccak/generalised-spec.c b/src/libkeccak/generalised-spec.c
index 94d6321..b053a98 100644
--- a/src/libkeccak/generalised-spec.c
+++ b/src/libkeccak/generalised-spec.c
@@ -19,6 +19,8 @@
#include "generalised-spec.h"
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#define have(v) (spec->v != LIBKECCAK_GENERALISED_SPEC_AUTOMATIC)
#define copy(v) (v = spec->v)
#define deft(v, dv) (have_##v ? v : (dv))
@@ -37,9 +39,6 @@
int libkeccak_degeneralise_spec(libkeccak_generalised_spec_t* restrict spec,
libkeccak_spec_t* restrict output_spec)
{
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-
long state_size, word_size, capacity, bitrate, output;
const int have_state_size = have(state_size);
const int have_word_size = have(word_size);
@@ -128,8 +127,6 @@ int libkeccak_degeneralise_spec(libkeccak_generalised_spec_t* restrict spec,
spec->word_size = state_size / 25;
return 0;
-
-# pragma GCC diagnostic pop
}
@@ -137,3 +134,5 @@ int libkeccak_degeneralise_spec(libkeccak_generalised_spec_t* restrict spec,
#undef copy
#undef have
+# pragma GCC diagnostic pop
+