From: Tobias Brunner Date: Fri, 5 Dec 2014 15:37:10 +0000 (+0100) Subject: bliss: Fix compilation warning with certain GCC versions X-Git-Tag: 5.2.2rc1~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f55a03a2de5d95389ef2417ad6ca393e1921f9ba;p=thirdparty%2Fstrongswan.git 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. --- 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;