From f55a03a2de5d95389ef2417ad6ca393e1921f9ba Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 5 Dec 2014 16:37:10 +0100 Subject: [PATCH] bliss: Fix compilation warning with certain GCC versions Theoretically, n could be zero and these variables are then used uninitialized. Older GCC versions warn about this and on Travis where we compile with -Werror this causes the tests to fail. --- src/libstrongswan/plugins/bliss/bliss_private_key.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstrongswan/plugins/bliss/bliss_private_key.c b/src/libstrongswan/plugins/bliss/bliss_private_key.c index 9e3767f080..f75ae8ea26 100644 --- a/src/libstrongswan/plugins/bliss/bliss_private_key.c +++ b/src/libstrongswan/plugins/bliss/bliss_private_key.c @@ -118,7 +118,8 @@ static bool sign_bliss_with_sha512(private_bliss_private_key_t *this, uint16_t q, q2, p, p2, *c_indices, tests = 0; uint32_t *ay; int32_t *y1, *y2, *z1, *z2, *u, *s1c, *s2c; - int32_t y1_min, y1i, y1_max, y2_min, y2i, y2_max, scalar, norm, ui; + int32_t y1_min = 0, y1i, y1_max = 0, y2_min = 0, y2i, y2_max = 0; + int32_t scalar, norm, ui; int16_t *ud, *uz2d, *z2d, value; int i, n; size_t seed_len; -- 2.47.2